[PI Day2021] 14 ways for approximating PI
hi
hello there
how it works
so you have the stop and run buttons which are used to stop or continue running an algorithm
14 ways of calculating PI
these are 14 ways of calculating PI 10 infinite series which all are gorgeous, and then 4 random ways i liked the most.
why 14?
well i planned on making 31.4 ways of calculating PI but i wanna share this on PIDay and i just started yesterday so i didn't have that much time
i switched to 14 because 3.14 you know, PI day 2022 i guess?
Disclaimer
the infinite series can't go more than a certain accuracy because of float-point precision and stuff which i don't know how to fix in javascript :)
and also this isn't meant to be special or good, it's just a milestone that i'm gonna later look back at it and say
"yeah i was a damn beginner" hopefully :D
edit
lol i just remembered how broken the replit sharing place is..
also what about Gauss-Legendre and Archimedes' method @CHRISTIANMATTHY
@CHRISTIANMATTHY lmao i know (almost) nothing about these, most of them i just copied from wikipedia i did'nt really study about there history
@Whippingdot thanks :D
lmao yes @OldWizard209
This is pi based on my code: 3.141592653589788
@JeffreyChen13 yep it doesn't go more precise then that because of floating point precision and stuff which is really sad :(
i may try creating my own big float class that contains a bigint in it but i think that's gonna be really hard
@potatojs Great! When you do, please notify me, I would definetly upvote it, and test it!
@JeffreyChen13 sure :)
@potatojs Thanks!
@potatojs Thanks!
noice someday people will know irrational pi
here's what i know: 3.14159265358979323846623383279502884197169393751
@NoNameByProgram ohhh that's cool, i wish i was that smart but my potato brain can't handle that much data :D
3.141592653589 is all I know :(
@YuvanVighnesh lol i know 3.141592653589793 :)
@YuvanVighnesh I know 3.1415926
pi is overrated e shall rule
ok boomer
@FlaminHotValdez
@FlaminHotValdez lol well yes and no
pogger