[Ecls-list] (expt 2 #c(-2d0 -1d0)) is inaccurate
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Fri Aug 20 18:27:48 UTC 2010
On Wed, Jun 2, 2010 at 12:21 AM, Raymond Toy <toy.raymond at gmail.com> wrote:
> Although it seems the spec allows this, ecl produces an answer that only
> has single-float accuracy for (expt 2 #c(-2d0 -1d0)). I think the
> issues arises because the result is computed as (exp (* #c(-2d0 -1d0)
> (log 2))). That (log 2) gives single-precision accuracy that is coerced
> to double-float.
Sorry for the delay, but I have finally changed this in the least intrusive
way, which is not very efficient --this test for increased accuracy more or
less doubles the cost of EXPT.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100820/42dfe93d/attachment.html>
More information about the ecl-devel
mailing list