[racket-dev] (round), etc. in Typed Racket

From: Petey Aldous (petey.aldous at utah.edu)
Date: Sat Dec 11 20:35:17 EST 2010

I've discovered what may be a bug in the type system of Typed Racket. The
functions that round - (round), (truncate), (ceiling), etc. are typed as
Real, not Integer; however, the result of (integer? (round (* 10e15
(random)))) is consistently true - and the same holds for the other rounding
functions.

 

Is this intentional? If so, why? If it is (or even if it isn't), how can I
transform the result of (random) to an Integer?

 

-          Petey 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20101211/cce77662/attachment.html>

Posted on the dev mailing list.