Last active
January 10, 2023 15:53
-
-
Save youz/4df6c4bc69f128c64c88fc9db23181b7 to your computer and use it in GitHub Desktop.
Atlas https://github.com/darrenks/atlas で円周率1000桁計算
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref. https://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/spigot.pdf | |
i=2:1+i | |
q=1:10*q*i*~1-2*i | |
r=180:10*u*(q*~2-5*i)+r-y*t | |
t=60:t*u | |
u=6+i*27+i*27 | |
y=((q*~12-27*i)+5*r)/5*t | |
c='0+1001[y | |
([c):'.:>c | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
q=1:10*q*i*~1-2*i=2:1+i | |
"3."@>'0+1001[y=((q*~12-27*i)+5*r=180:10*u*(q*~2-5*i)+r-y*t=60:t*u=6+i*27+i*27)/5*t |
Author
youz
commented
Jan 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment