Post Reply 
PDQ Algorithm: Infinite precision best fraction within tolerance
02-25-2019, 11:10 AM
Post: #22
RE: PDQ Algorithm: Infinite precision best fraction within tolerance
(02-24-2019 08:36 PM)smartin Wrote:  Finally inspired to try out PDQ on the Prime, but I could not get all the examples to work out. I'm using PDQ from hpcalc.org (https://www.hpcalc.org/details/7477) on a Prime with CAS ver 1.4.9 and ROM 2.1.14181.

Example #1: works as advertised
but,
Example #2: pdq(\(\pi\),14) = \(\dfrac{111513555}{35495867}\)

Example #3: pdq(\(\pi,\dfrac{13131}{10^{440}}\)) = \(\dfrac{27633741218861}{8796093022208}\)

That's because you are using the built-in pi, which is less accurate than the precision you're asking for. Instead of using the built-in pi, use PI500 as your input instead; it's accurate to 500 digits. PI500 is available in the original posting.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: PDQ Algorithm: Infinite precision best fraction within tolerance - Joe Horn - 02-25-2019 11:10 AM



User(s) browsing this thread: 1 Guest(s)