Re: n accuracy



In article <465d3719$0$90269$14726298@xxxxxxxxxxxxxxx>,
"Alex Mizrahi" <udodenko@xxxxxxxxxxxxxxxxxxxxx> wrote:

(message (Hello 'Edi)
(you :wrote :on '(Wed, 30 May 2007 09:26:35 +0200))
(

??>> Yesterday I was lisping some statistics so I needed e, considering I
??>> couldn't find it at hyperspec (too much coffein I guess) so I used
??>> (exp 1) => 2.7182818 but author of the stat book seemed to have
??>> different idea about some digits.

EW> This looks like the correct approximation for 8 digits to me.

btw, in CLISP:

[1]> (exp 1l0)
2.7182818284590452354L0
[2]> (exp 1d0)
2.718281828459045d0
[3]> (exp 1.0)
2.7182817

last value looks a bit strange, double and long versions have all digits
correct.

What do you get if you simply type:

2.7182818

?

--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.



Relevant Pages

  • Re: n accuracy
    ... fireblade wrote: ... couldn't find it at hyperspec (too much coffein I guess) so I used ... different idea about some digits. ...
    (comp.lang.lisp)
  • Re: n accuracy
    ... couldn't find it at hyperspec (too much coffein I guess) so I used ... This looks like the correct approximation for 8 digits to me. ...
    (comp.lang.lisp)
  • Re: n accuracy
    ... EW> This looks like the correct approximation for 8 digits to me. ... f>>long-floats or made my program use bignums. ... in CLISP you can control how long long numbers are. ...
    (comp.lang.lisp)