From: Gabriel Dos Reis <gdr@cs...> - 2009-01-17 01:10:45
The log function in the form
(let ((a (expt 234 108)))
(and (< a most-positive-double-float)
(log a 10)))
signals a floating-point-overflow -- although the answer is less than 256.
GCL and SBCL evaluates the form with no fuss. This is with ECL-8.12.0
-- I cannot build ECL CVS. I'm not sure the hyperspec specifies
exceptional situations for log.
The above was extracted from failing testcases on ECL-based OpenAxiom.
From: Juan Jose Garcia-Ripoll <juanjose.garciaripoll@go...> - 2009-01-19 16:08:42
On Sat, Jan 17, 2009 at 2:10 AM, Gabriel Dos Reis <gdr@...> wrote:
> The log function in the form
> (let ((a (expt 234 108)))
> (and (< a most-positive-double-float)
> (log a 10)))
That bignum cannot be represented as a floating point number and thus
it causes LOG to overflow. There are algorithms to handle these cases,
but you have to understand that the specification allows a floating
point operation to overflow in these cases. I take note, though and
will try to change the behavior for this particular function.
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28009 (Spain)