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:
parent
cff4eef7b2
commit
ff1c3874cc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user