Suppressing the arithmetic-error condition
Hello All! Is there a way to suppress signaling the arithmetic-error conditions such as division-by-zero or floating-point-overflow during the extensive numeric calculations? I know that it is possible to handle the conditions with help of the handler-case form but it is too slow in my particular scenario as I have to divide the computation into many pieces. It doesn't conform to the ANSI standard but I would like the following code return either 1d+-0 (nan) or -1d++0 (-infinity): cl-user > (log (/ 1 1d++0)) Error: Arithmetic error in LOG of (0.0D0): Argument must not be zero. For example, Scala returns -Infinity in this case: scala> math.log(1 / Double.PositiveInfinity) res1: Double = -Infinity It seems there are flags in some CL implementations to control this behaviour, although I'm not quite sure. Is there something similar for LispWorks? Thanks, David _______________________________________________ Lisp Hug - the mailing list for LispWorks users lisp-hug@lispworks.com http://www.lispworks.com/support/lisp-hug.html