On 7/29/07, Harald Hanche-Olsen <hanche@...> wrote:
> + "Robert Dodier" <robert.dodier@...>:
> | Considering (expt b x), it appears that expt returns something
> | other than the x-fold product of b, even if x is a small integer.
> | Seems to return (exp (* x (log b))) instead, which is OK, I guess,
> | but has the potential to be slightly surprising.
> Emphasis on slightly here, please.
What I meant to say was "intensely frustrating".
> | E.g. this is what SBCL 1.0 on Linux yields.
> | (let ((a 1.1234567890123456d0)) (- (expt a 5) (* a a a a a)))
> | => -2.220446049250313d-16
> | For comparison, Clisp 2.38, GCL 2.6.7, and Allegro Express 8.0
> | all return 0.0d0 here.
> Why should this be a requirement?
Well, I don't pretend that it could be a requirement.
But as a practical matter it seems easier to convince SBCL
to behave like some other Lisp implementations, rather than
getting the others to behave like SBCL.
My own selfish goal here is to patch some numerical code
(Maxima) so that it acts the same with different underlying
Lisp implementations. As that seems like a useful goal in
general, perhaps you'll be interested to further it, perhaps not.
I'm writing today just to gauge the interest of the SBCL developers.