> "P" == ProfJCNash
> on Sat, 4 Jul 2015 21:42:27 -0400 writes:
P> n163 <- mpfr(163, 500)
P> is how I set up the number.
Yes, and you have needed to specify the desired precision.
As author and maintainer of Rmpfr, let me give my summary of this overly
long thread (with ma
_
>> From: David Winsemius
>> Sent: Saturday, July 4, 2015 1:12 PM
>> To: Duncan Murdoch
>> Cc: r-help; John Nash; Ravi Varadhan
>> Subject: Re: [R] : Ramanujan and the accuracy of floating point computations
>> - using Rmpfr in R
>>
nujan and the accuracy of floating point computations -
using Rmpfr in R
> On Jul 4, 2015, at 12:20 AM, Duncan Murdoch wrote:
>
> On 04/07/2015 8:21 AM, David Winsemius wrote:
>>
>>> On Jul 3, 2015, at 11:05 PM, Duncan Murdoch
>>> wrote:
>>>
&
> On Jul 4, 2015, at 12:20 AM, Duncan Murdoch wrote:
>
> On 04/07/2015 8:21 AM, David Winsemius wrote:
>>
>>> On Jul 3, 2015, at 11:05 PM, Duncan Murdoch
>>> wrote:
>>>
>>> On 04/07/2015 3:45 AM, David Winsemius wrote:
> On Jul 3, 2015, at 5:08 PM, David Winsemius
> wrote:
>>
i
>
> From: David Winsemius
> Sent: Friday, July 3, 2015 2:06 PM
> To: John Nash
> Cc: r-help; Ravi Varadhan
> Subject: Re: [R] : Ramanujan and the accuracy of floating point
> computations - using Rmpfr in R
>
> > On Jul 3, 20
On 04/07/2015 8:21 AM, David Winsemius wrote:
>
>> On Jul 3, 2015, at 11:05 PM, Duncan Murdoch wrote:
>>
>> On 04/07/2015 3:45 AM, David Winsemius wrote:
>>>
On Jul 3, 2015, at 5:08 PM, David Winsemius wrote:
It doesn’t appear to me that mpfr was ever designed to handle
It doesn’t appear to me that mpfr was ever designed to handle expressions
as the first argument.
>>>
>>> This could be a start. Obviously one would wnat to include code to do other
>>> substitutions probably using the all.vars function to pull out the other
>>> “constants” and ’numeric
>> On Jul 3, 2015, at 12:01 PM, Ravi Varadhan wrote:
>>>>
>>>> Thank you all. I did think about declaring `pi' as a special constant,
>>>> but for some reason didn't actually try it.
>>>> Would it be easy to have the mpfr() written such tha
sqrt(n163)*pitan)
>>>> r500
>>>> check <- "262537412640768743.25007259719818568887935385..."
>>>> savehistory("jnramanujan.R")
>>>>
>>>> Note that I used 4*atan(1) to get pi.
>>>
>>> RK got
t;>> check <- "262537412640768743.25007259719818568887935385..."
>>> savehistory("jnramanujan.R")
>>>
>>> Note that I used 4*atan(1) to get pi.
>>
>> RK got it right by following the example in the help page for mpfr:
&
t; Is this easy to do?
>
> Best,
> Ravi
>
> From: David Winsemius
> Sent: Friday, July 3, 2015 2:06 PM
> To: John Nash
> Cc: r-help; Ravi Varadhan
> Subject: Re: [R] : Ramanujan and the accuracy of floating point computations
>
ther than converting.
>
> JN
>
> On 15-07-03 06:00 AM, r-help-requ...@r-project.org wrote:
>
>> Message: 40
>> Date: Thu, 2 Jul 2015 22:38:45 +0000
>> From: Ravi Varadhan
>> To: "'Richard M. Heiberger'" , Aditya Singh
>>
>>
> On 15-07-03 06:00 AM, r-help-requ...@r-project.org wrote:
>
>> Message: 40
>> Date: Thu, 2 Jul 2015 22:38:45 +
>> From: Ravi Varadhan
>> To: "'Richard M. Heiberger'" , Aditya Singh
>>
>> Cc: r-help
>> Subject: Re: [R]
/www.wolframalpha.com/
>
> I am not sure that the precedence matters in Rmpfr. Even if it does, the
> answer you get is still wrong as you showed.
>
> Thanks,
> Ravi
>
> -Original Message-
> From: Richard M. Heiberger [mailto:r...@temple.edu]
> Sent: Thursday
Also when I try the following with Rmpfr, it works jut fine.
> exp(sqrt(mpfr(163, 120)) * Const("pi", 120))
1 'mpfr' number of precision 120 bits
[1] 262537412640768743.25007601
and
> exp(sqrt(mpfr(163, 400)) * Const("pi", 400))
1 'mpfr' number of precision 400 bits
[1]
2625
accuracy of floating point computations -
using Rmpfr in R
There is a precedence error in your R attempt. You need to convert
163 to 120 bits first, before taking
its square root.
> exp(sqrt(mpfr(163, 120)) * mpfr(pi, 120))
1 'mpfr' number of precision
it does,
>the answer you get is still wrong as you showed.
>>
>> Thanks,
>> Ravi
>>
>> -----Original Message-
>> From: Richard M. Heiberger [mailto:r...@temple.edu]
>> Sent: Thursday, July 02, 2015 6:30 PM
>> To: Aditya Singh
>> Cc: Ravi V
Thanks,
>> Ravi
>>
>> -Original Message-
>> From: Richard M. Heiberger [mailto:r...@temple.edu]
>> Sent: Thursday, July 02, 2015 6:30 PM
>> To: Aditya Singh
>> Cc: Ravi Varadhan; r-help
>> Subject: Re: [R] : Ramanujan and the accuracy of floating p
Even if it does, the
> answer you get is still wrong as you showed.
>
> Thanks,
> Ravi
>
> -Original Message-
> From: Richard M. Heiberger [mailto:r...@temple.edu]
> Sent: Thursday, July 02, 2015 6:30 PM
> To: Aditya Singh
> Cc: Ravi Varadhan; r-help
&g
There is a precedence error in your R attempt. You need to convert
163 to 120 bits first, before taking
its square root.
> exp(sqrt(mpfr(163, 120)) * mpfr(pi, 120))
1 'mpfr' number of precision 120 bits
[1] 262537412640768333.51635812597335712954
## just the last four characters to the left o
This is the standard FAQ 7.31 and then read in detail the referenced paper.
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Thu, Jul 2, 2015 at 2:02 PM, Aditya Singh via R-help <
r-help@r-project.org> wrot
Ravi
I am a chemical engineer by training. Is there not something like law of
corresponding states in numerical analysis?
Aditya
--
On Thu 2 Jul, 2015 7:28 AM PDT Ravi Varadhan wrote:
>Hi,
>
>Ramanujan supposedly discovered that the number, 163, has this interest
Ravi
1. You may want to check the sqrt too.
2. Why not take log and try?
Aditya
--
On Thu 2 Jul, 2015 10:18 AM PDT Boris Steipe wrote:
>Just a wild guess, but did you check exactly which operations are actually
>done to high precision? Obviously you will need hi
I don't know much about Rmpfr, but it doesn't look like your "pi" or "sqrt" or
"exp" are being handled by that package, so I am not really seeing why your
result should be more accurate when you have loaded that package.
---
Just a wild guess, but did you check exactly which operations are actually done
to high precision? Obviously you will need high-resolution representations of
pi and e to get an improved result.
B.
On Jul 2, 2015, at 10:28 AM, Ravi Varadhan wrote:
> Hi,
>
> Ramanujan supposedly discovered t
Hi,
Ramanujan supposedly discovered that the number, 163, has this interesting
property that exp(sqrt(163)*pi), which is obviously a transcendental number, is
real close to an integer (close to 10^(-12)).
If I compute this using the Wolfram alpha engine, I get:
262537412640768743.25
26 matches
Mail list logo