[Ecls-list] Lots of regressions due to -0.0

Raymond Toy toy.raymond at gmail.com
Sat Oct 4 22:42:36 UTC 2008


Juan Jose Garcia-Ripoll wrote:
> If you ever look at the automated build logs
>    http://ecls.sourceforge.net/logs.html
> you will notice that the ANSI incompatibility tests have jumped from
> about 32 to 68 or so.
>
> This is due to the introduction of negative zeros, which are a source
> of subtle "mistakes" because i) they are not EQL, but ii) they are =,
> EQUAL and EQUALP, and iii) (< -0.0 0.0) is false but iv) (float-sign
> -0.0) < (float-sign 0.0).
>   
Yes, I'm not surprised.  It took quite a while to get cmucl to handle
negative zeros.  I'm sure there are still places where negative zeroes
are handled incorrectly.
> That causes the hash cache in subtypep to fail, it breaks the code for
> handling intervals and other places.
>
>   
I don't know what the hash cache is, but I think ANSI CL says -0 and 0
should hash the same.  The easy way to make that happen is to add 0 to
the number to be hashed. 

Ray





More information about the ecl-devel mailing list