[Glass] Negative infinity and positive infinity have the same sign
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Thu Jan 26 09:43:07 PST 2017
Thanks Monty, I've submitted internal bug #46646 "Negative infinity and
positive infinity have the same sign (IEEE Standard 754)".
If you need a patch, the following topaz script should help:
method: Float
sign
| s |
s := self _sign .
self = 0.0 ifTrue:[ s == 1 ifTrue:[ ^ 0]].
^ s
%
Dale
On 01/25/2017 12:45 PM, monty via Glass wrote:
> On 3.3.0, "-0.0 sign = 0.0 sign". On Pharo, "-1 sign = -1", "-0.0 sign = -1", "0.0 sign = 0", and "1 sign = 1". IEEE Standard 754 mandates that negative zero have the same sign bit as a negative number.
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
More information about the Glass
mailing list