From ff1c3874cc982ea86f25aeb75834745adf46685e Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Fri, 11 Jun 2010 16:33:06 -0400 Subject: [PATCH] Added a coercion to inexact to avoid the case: (* 0) -> exact 0 which causes a segfault when the result is used with an unsafe-fl operation. --- collects/tests/racket/benchmarks/shootout/typed/heapsort.rktl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/tests/racket/benchmarks/shootout/typed/heapsort.rktl b/collects/tests/racket/benchmarks/shootout/typed/heapsort.rktl index ff7eb0bba6..8dc73b9833 100644 --- a/collects/tests/racket/benchmarks/shootout/typed/heapsort.rktl +++ b/collects/tests/racket/benchmarks/shootout/typed/heapsort.rktl @@ -17,7 +17,7 @@ (: gen_random (Float -> Float)) (define (gen_random max) (set! LAST (modulo (+ (* LAST IA) IC) IM)) - (/ (* max LAST) IM)) + (/ (* max (exact->inexact LAST)) IM)) (: heapsort (Natural (Vectorof Float) -> (U Void True))) (define (heapsort n ra)