[racket-dev] `math' compilation time !!!

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Fri Mar 1 11:22:39 EST 2013

At Fri, 01 Mar 2013 09:05:21 +0100,
Marijn wrote:
> On 27-02-13 21:51, Neil Toronto wrote:
> 
> > (An example that came up in the implementation of matrix norms: the
> > type of (sqrt (/ 1 x)) isn't Nonnegative-Real if x :
> > Nonnegative-Real, but Complex. Consider x = -0.0. Without TR's
> > complaints, `matrix-norm' would have contained a time bomb.)
> 
> Should -0.0 really be a Nonnegative-Real?

That's by design.

Including both floating-point zeroes in both non-negative and
non-positive types is necessary to make occurrence typing useful for
comparisons between floating-point numbers and zero (see PR12706 for
more details). It also simplifies parts of the numeric base environment
significantly.

Vincent


Posted on the dev mailing list.