Floating point exceptions

Tim Olson tim at jumpnet.com
Mon Mar 22 14:37:08 UTC 1999


>On NT I find that if I inspect the result of
>
>	1.7976931348623159e308 * 1.7976931348623159e308
>
>(which is the same as MaxVal * MaxVal) I get Infinity.  I think this means
>that the floating point code in the image somewhere is (correctly)
>determining that it's getting back an IEEE infinity, and is then creating a
>reference to the Infinity constant.  Curiouser and curiouser...  

No, it's just returning the IEEE infinity value as the result of the 
Float multiply; there's no referencing of the constant returned from 
"Float infinity", which is just another Float instance that has the value 
of Infinity:


(1.7976931348623159e308 * 1.7976931348623159e308) = Float infinity "true"


(1.7976931348623159e308 * 1.7976931348623159e308) == Float infinity 
"false"



     -- tim





More information about the Squeak-dev mailing list