minus zero
Posted: Wed Dec 17, 2003 2:47 pm
I've noticed that:
> (ceil 0.0001)
1
> (ceil -0.0001)
-0
> (setq minuszero (ceil -0.0001))
-0
> minuszero
-0
> (= 0 minuszero)
true
The maths I've tried minuszero with act as I'd expect
except perhaps
> (abs minuszero )
-0
>
and (format doesn't like minuszero viz.
> (format "%d" minuszero)
data type and format don't match in function format : minuszero
> minuszero
-0
> (format "%x" minuszero)
data type and format don't match in function format : minuszero
>
Nigel
> (ceil 0.0001)
1
> (ceil -0.0001)
-0
> (setq minuszero (ceil -0.0001))
-0
> minuszero
-0
> (= 0 minuszero)
true
The maths I've tried minuszero with act as I'd expect
except perhaps
> (abs minuszero )
-0
>
and (format doesn't like minuszero viz.
> (format "%d" minuszero)
data type and format don't match in function format : minuszero
> minuszero
-0
> (format "%x" minuszero)
data type and format don't match in function format : minuszero
>
Nigel