Floating point exceptions

David T. Lewis lewis at mail.msen.com
Sat Mar 20 15:26:47 UTC 1999


On Fri, Mar 19, 1999 at 02:17:09PM -0800, Tim Rowledge wrote:

> 	Infinity _ MaxVal * MaxVal
> causes a floating point exception and program exit.
> 
> On the face of it, I'm not surprised; after all, we've just carefully found the
....
> Is it really the case that the float libraries just ignore errors like
> overflow? Is there some switch being set somewhere in the PC/MAc platform code
> that I haven't seen? Should Sq code assume that it is ok to square Float
> MaxVal? Does ANSI/IEEE allow for this? Do unix VMs have similar trouble?
> 
> tim

OK on Linux; MaxVal * MaxVal answers infinity. Presumably the VM on your
system is not trapping the exception and passing it to the image. There
seems to be some variability in how different machines, operating systems,
and C math libraries handle this stuff, and consensus from earlier
discussion was that the VM and/or lower level libraries should be
responsible for getting it right (not the Smalltalk image).





More information about the Squeak-dev mailing list