Re: n accuracy



fireblade wrote:
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. So I've done this to calculate
accuracy of e , actually it's power n:
;;;; Exponent of e

;;; e is the base of the natural logarithms
;;; 1 n
;;; calculated as e =(1 + - )
;;; n
;;; or in lisp

I forget whether you're going to have some issues with rounding error or not, when using that formula. You may want to check a proper numerics manual (NOT "Numerical Methods") to be sure.

mfh
.



Relevant Pages

  • Re: n accuracy
    ... ??>> couldn't find it at hyperspec (too much coffein I guess) so I used ... EW> This looks like the correct approximation for 8 digits to me. ...
    (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)