P == ProfJCNash profjcn...@gmail.com
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
to do?
Best,
Ravi
From: David Winsemius dwinsem...@comcast.net
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
On 04/07/2015 8:21 AM, David Winsemius wrote:
On Jul 3, 2015, at 11:05 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote:
On 04/07/2015 3:45 AM, David Winsemius wrote:
On Jul 3, 2015, at 5:08 PM, David Winsemius dwinsem...@comcast.net wrote:
It doesn’t appear to me that mpfr was ever
Nash
Cc: r-help; Ravi Varadhan
Subject: Re: [R] : Ramanujan and the accuracy of floating point
computations - using Rmpfr in R
On Jul 3, 2015, at 8:08 AM, John Nash john.n...@uottawa.ca wrote:
Third try -- I unsubscribed and re-subscribed. Sorry to Ravi for extra
traffic
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’ values to make
On Jul 4, 2015, at 12:20 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote:
On 04/07/2015 8:21 AM, David Winsemius wrote:
On Jul 3, 2015, at 11:05 PM, Duncan Murdoch murdoch.dun...@gmail.com
wrote:
On 04/07/2015 3:45 AM, David Winsemius wrote:
On Jul 3, 2015, at 5:08 PM, David
dwinsem...@comcast.net
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, 2015, at 8:08 AM, John Nash john.n...@uottawa.ca wrote:
Third try -- I
...@comcast.net
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
On Jul 4, 2015, at 12:20 AM, Duncan Murdoch murdoch.dun...@gmail.com
wrote:
On 04/07/2015 8
: Re: [R] : Ramanujan and the accuracy of floating point computations -
using Rmpfr in R
On Jul 4, 2015, at 12:20 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote:
On 04/07/2015 8:21 AM, David Winsemius wrote:
On Jul 3, 2015, at 11:05 PM, Duncan Murdoch murdoch.dun...@gmail.com
wrote
-help r-help@r-project.org
Subject: Re: [R] : Ramanujan and the accuracy of floating point
computations - using Rmpfr in R
Message-ID:
14ad39aaf6a542849bbf3f62a0c2f...@dom-eb1-2013.win.ad.jhu.edu
Content-Type: text/plain; charset=utf-8
Hi Rich,
The Wolfram answer is correct.
http
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]
...@temple.edu, Aditya Singh
aps...@yahoo.com
Cc: r-help r-help@r-project.org
Subject: Re: [R] : Ramanujan and the accuracy of floating point
computations - using Rmpfr in R
Message-ID:
14ad39aaf6a542849bbf3f62a0c2f...@dom-eb1-2013.win.ad.jhu.edu
Content-Type: text/plain; charset=utf
Varadhan ravi.varad...@jhu.edu
To: 'Richard M. Heiberger' r...@temple.edu, Aditya Singh
aps...@yahoo.com
Cc: r-help r-help@r-project.org
Subject: Re: [R] : Ramanujan and the accuracy of floating point
computations - using Rmpfr in R
Message-ID:
14ad39aaf6a542849bbf3f62a0c2f...@dom-eb1
...@jhu.edu
To: 'Richard M. Heiberger' r...@temple.edu, Aditya Singh
aps...@yahoo.com
Cc: r-help r-help@r-project.org
Subject: Re: [R] : Ramanujan and the accuracy of floating point
computations - using Rmpfr in R
Message-ID:
14ad39aaf6a542849bbf3f62a0c2f...@dom-eb1-2013
From: David Winsemius dwinsem...@comcast.net
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, 2015, at 8:08 AM, John
and the 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 120 bits
[1
; r-help
Subject: Re: [R] : Ramanujan and the 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
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
Subject: Re: [R] : Ramanujan and the accuracy of floating point computations
- using Rmpfr in R
, July 02, 2015 6:30 PM
To: Aditya Singh
Cc: Ravi Varadhan; r-help
Subject: Re: [R] : Ramanujan and the 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
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
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
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.
---
Jeff
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:
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 ravi.varad...@jhu.edu wrote:
Hi,
Ramanujan
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
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
26 matches
Mail list logo