Fix negative zero smashing with bootstrap
parent
84c7f10ab7
commit
4ee4357e75
|
@ -52,6 +52,9 @@ GENERIC: (eql?) ( obj1 obj2 -- ? )
|
||||||
|
|
||||||
M: integer (eql?) = ;
|
M: integer (eql?) = ;
|
||||||
|
|
||||||
|
M: float (eql?)
|
||||||
|
over float? [ fp-bitwise= ] [ 2drop f ] if ;
|
||||||
|
|
||||||
M: sequence (eql?)
|
M: sequence (eql?)
|
||||||
over sequence? [
|
over sequence? [
|
||||||
2dup [ length ] bi@ =
|
2dup [ length ] bi@ =
|
||||||
|
|
|
@ -81,6 +81,8 @@ TUPLE: complex { real real read-only } { imaginary real read-only } ;
|
||||||
|
|
||||||
UNION: number real complex ;
|
UNION: number real complex ;
|
||||||
|
|
||||||
|
: fp-bitwise= ( x y -- ? ) [ double>bits ] bi@ = ; inline
|
||||||
|
|
||||||
GENERIC: fp-special? ( x -- ? )
|
GENERIC: fp-special? ( x -- ? )
|
||||||
GENERIC: fp-nan? ( x -- ? )
|
GENERIC: fp-nan? ( x -- ? )
|
||||||
GENERIC: fp-qnan? ( x -- ? )
|
GENERIC: fp-qnan? ( x -- ? )
|
||||||
|
|
Loading…
Reference in New Issue