Added a coercion to inexact to avoid the case: (* <float> 0) -> exact 0

which causes a segfault when the result is used with an unsafe-fl
operation.
This commit is contained in:
Vincent St-Amour 2010-06-11 16:33:06 -04:00
parent cff4eef7b2
commit ff1c3874cc

View File

@ -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)