About use of specific error
Andreas Raab
andreas.raab at gmx.de
Fri Mar 17 04:43:32 UTC 2006
nicolas cellier wrote:
> As a perfect example, we can think of arithmetic exception handling (overflow,
> underflow, division by zero, domain error...). I would like to have these
> exceptions in Squeak like they exist in VW. Unfortunately, Squeak use the
> perverse IEEE NaN and Inf... In my opinion, this is rarely wanted and most
> people would prefer a program to stop with an exception rather than having
> these needless computations silently proceeding with NaNs. Beside it is then
> difficult to find the originator of the error. Last, overflow does not really
> match mathematical notion of infinity, i think confusion is dangerous here...
Interesting. In my use of floating point math the behavior in Squeak is
just exactly right ;-) I have never had the need for signaling
exceptions upon NaN or Inf. I guess that's the difference between
scientific computing and computer graphics ;-)
> Lets return to arithmetic exceptions, I would really like to have them instead
> of silent NaNs/Inf. NaN should be a way of handling arithmetic exception, but
> not the preferred way. Anyone disagree ?
Completely. Personally, I've yet to find a place where a floating point
exceptions would be more useful than silent NaNs or Infs (btw, I'm not
arguing that this has to be true in your case, just that it is in mine).
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|