[R] Extending the accuracy of exp(1) in R

2010-11-09 Thread Shant Ch
Hi, I want to use a more accurate value of exp(1).  The value given by R is 2.718282. I want a value which has more than 15 decimal places. Can anyone let me know how can I increase the accuracy level. Actually there are some large multipliers of exp(1) in my whole expression, and I want a

Re: [R] Extending the accuracy of exp(1) in R

2010-11-09 Thread Łukasz Ręcławowicz
2010/11/9 Shant Ch sha1...@yahoo.com Can anyone let me know how can I increase the accuracy level. library(Rmpfr) exp(mpfr(1,128)) 1 'mpfr' number of precision 128 bits [1] 2.718281828459045235360287471352662497759 -- Mi³ego dnia [[alternative HTML version deleted]]

Re: [R] Extending the accuracy of exp(1) in R

2010-11-09 Thread Hadley Wickham
Where the value of exp(1) as computed by R is concerned, you have been deceived by what R displays (prints) on screen. The default is to display any number to 7 digits of accuracy, but that is not the accuracy of the number held internally by R:  exp(1)  # [1] 2.718282  exp(1) - 2.718282  

Re: [R] Extending the accuracy of exp(1) in R

2010-11-09 Thread Ted Harding
On 09-Nov-10 13:21:10, Shant Ch wrote: Hi, I want to use a more accurate value of exp(1)._ The value given by R is 2.718282. I want a value which has more than 15 decimal places. Can anyone let me know how can I increase the accuracy level. Actually there are some large multipliers of

Re: [R] Extending the accuracy of exp(1) in R

2010-11-09 Thread David Winsemius
On Nov 9, 2010, at 8:21 AM, Shant Ch wrote: Hi, I want to use a more accurate value of exp(1). The value given by R is 2.718282. Well, not really. That is what is printed at the console with the default settings for digits. The internal representation is wider: format(exp(1),

Re: [R] Extending the accuracy of exp(1) in R

2010-11-09 Thread Duncan Murdoch
On 09/11/2010 8:21 AM, Shant Ch wrote: Hi, I want to use a more accurate value of exp(1). The value given by R is 2.718282. I want a value which has more than 15 decimal places. Can anyone let me know how can I increase the accuracy level. The value in R is accurate to approximately 15

Re: [R] Extending the accuracy of exp(1) in R

2010-11-09 Thread Ted Harding
On 09-Nov-10 13:57:08, Hadley Wickham wrote: Where the value of exp(1) as computed by R is concerned, you have been deceived by what R displays (prints) on screen. The default is to display any number to 7 digits of accuracy, but that is not the accuracy of the number held internally by R: