From 193bff7a2b747735daeb5ddbda34e787540ce6a1 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Fri, 18 Jan 2013 18:19:14 -0500 Subject: [PATCH] Fix collatz typed benchmark for fix to odd? and even?. --- collects/tests/racket/benchmarks/common/typed/collatz.rktl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/tests/racket/benchmarks/common/typed/collatz.rktl b/collects/tests/racket/benchmarks/common/typed/collatz.rktl index 03804176d1..459d536d0e 100644 --- a/collects/tests/racket/benchmarks/common/typed/collatz.rktl +++ b/collects/tests/racket/benchmarks/common/typed/collatz.rktl @@ -10,7 +10,9 @@ [(odd? n) (+ 1 (cycle-length (+ 1 (* 3 n))))] [(even? n) - (+ 1 (cycle-length (/ n 2)))] + ;; TR note: quotient would work better, but that's the other version of + ;; the benchmark + (+ 1 (cycle-length (assert (/ n 2) integer?)))] [else (error "unreachable")])) (time (let: loop : (U False Integer)