[Ecls-list] How to get floating point underflow to yield zero?

Mark Hoemmen mark.hoemmen at gmail.com
Wed Apr 30 16:49:04 UTC 2008

Robert Dodier wrote:
> In working through the Maxima test suite, there is at least one error
> which is caused by floating point underflow. Other Lisp implementations
> let floating point underflow yield zero, and that is what Maxima expects.
> It appears that floating point underflow causes an error in ECL.
> How can I convince ECL to yield zero instead? Thanks for your help.

I sent a personal e-mail with a possible solution -- FYI the idea is to 
modify the floating-point status word so that underflow signals (I 
_think_ there is such a thing), catch the signal, and handle it with an 
appropriate restart (substitute in zero for the denorm number).

FYI, gradual underflow is mandated by the IEEE 754 floating-point 
standard, so it's Maxima itself and the other Lisp implementations that 
are noncompliant, rather than ECL.


More information about the ecl-devel mailing list