Happy Pi Day!
|
03-14-2023, 01:48 PM
Post: #1
|
|||
|
|||
Happy Pi Day!
3.14159265359...
Have a great March 14! |
|||
03-14-2023, 05:56 PM
Post: #2
|
|||
|
|||
RE: Happy Pi Day!
How I want a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.
|
|||
03-15-2023, 12:59 AM
Post: #3
|
|||
|
|||
RE: Happy Pi Day! | |||
03-15-2023, 03:11 AM
Post: #4
|
|||
|
|||
RE: Happy Pi Day!
Thank you, Gerson!
|
|||
03-15-2023, 07:21 AM
Post: #5
|
|||
|
|||
RE: Happy Pi Day!
(03-15-2023 12:59 AM)Gerson W. Barbosa Wrote:(03-14-2023 01:48 PM)Eddie W. Shore Wrote: 3.14159265359... 27+ hours?!? Greetings, Massimo -+×÷ ↔ left is right and right is wrong |
|||
03-15-2023, 03:10 PM
(This post was last modified: 03-15-2023 03:29 PM by Gerson W. Barbosa.)
Post: #6
|
|||
|
|||
RE: Happy Pi Day!
(03-15-2023 07:21 AM)Massimo Gnerucci Wrote: 27+ hours?!? Yes, 27h07m04s to be exact. I was expecting it to last about 24 hours, by my estimation has gone a bit wrong. This one was not meant to be fast. I have used probably the worst method to compute \(\pi\) ever, the Wallis Product multiplied by a correction factor, which requires a lot of full-precision multiplication and divisions: Or, in WolframAlpha notation, Product((4k^2)/(4k^2 - 1),{k,1,n})*(2 + 4/(8n + 3 + ContinuedFractionK[4k^2 - 1,8n +4,{k,1,n}])) QBASIC and HP-42S/Free42 programs available here and here. Anyway, it was a good test for my MSX 8-bit computer from 1987 :-) Next time, for speed, I'll try a more traditional Machin formula. Ciao, Gerson. |
|||
05-01-2023, 01:21 PM
(This post was last modified: 05-01-2023 01:26 PM by Gerson W. Barbosa.)
Post: #7
|
|||
|
|||
RE: Happy Pi Day!
The MSX BASIC code runs with little modification in QBASIC, mainly because the former was also developed by Microsoft. Thus, by running it in non-emulated DOS we can achieve much greater speed even in my old desktop computer from fourteen years ago: 1002 decimal places in "only" 248 seconds (compiled) or 307 seconds (interpreted). BTW, 276 decimal places in 6 seconds (2 seconds when compiled). The program works also on Turbo BASIC, albeit about 30% slower.
Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: