[racket-dev] Single-flonum-ness not preserved in racket/math functions
At Tue, 05 Jun 2012 22:05:26 -0600,
Neil Toronto wrote:
> Thanks! I've adapted it and will commit the changes with the ones to
> racket/math.
Great, thanks!
> I've managed to make it always find a counterexample. But there are only
> a few single-flonum -> flonum issues. Most of them are because I've
> changed the random-flonum-generating code to sometimes generate *very*
> small random numbers.
Good idea.
> Here's the counterexample I found earlier today
> that motivated that change to the random testing:
>
> #lang typed/racket
>
> (require/typed
> unstable/flonum
> [+min.0 Positive-Float]) ; the smallest positive flonum
>
> > +min.0
> - : Float [generalized from Positive-Float]
> 4.9406564584125e-324
> > (sqr +min.0)
> - : Float [generalized from Positive-Float]
> 0.0
>
>
> I'm not comfortable messing with those precise primitive types yet, so
> I'll let you handle that.
No problem, I'll fix it.
Vincent