Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just finished calculating pi to 30 trillion places.
#15
(08-15-2022, 08:43 PM)Pete Wrote:
(08-15-2022, 07:28 PM)JRace Wrote: @KernelPanic: the first constant:

0.0002885855652225477 is being stored into pi as:
0.0002885855792555958

[Image: 2022-08-15-141747.png]


Edited to add: also, (Sqr(8) / 9801) = 0.0002885855792555958 according to QB64.
WolframAlpha says it's: 0.00028858556522254775

Huh

I haven't programmed square roots for string math yet, but with a precision calculator, sqrt(8) = 2.8284271247461900976

so with string math: 2.8284271247461900976 / 9801=0.00028858556522254775

0.00028858556522254775 (String math)

0.0002885855792555958  (QB64 reported by JRice)
0.00028858556522254775 (WolframAlpha)

So I would concur WolframAlpha is correct.

Pete


Yeah, looks like a precision issue, but the location of the discrepancy strikes me as odd.
Reply


Messages In This Thread
RE: Just finished calculating pi to 30 trillion places. - by JRace - 08-16-2022, 12:56 AM



Users browsing this thread: 3 Guest(s)