rob pike on Nostr: Wow, Chudnovsky's algorithm converges fast! I put it into ivy (code in the alt text) ...
Wow, Chudnovsky's algorithm converges fast! I put it into ivy (code in the alt text) and the first term alone is good to 10 digits. Each term adds 30+ bits to the precision. Here the argument to chudpi is how many terms to sum.
)get 'chudpi.ivy'
chudpi 0
3.1415926535897342076684535915782983407622
log pi - chudpi 0
-30.4607171517456828366955039144850114298603
log pi - chudpi 10
-357.9935248416118262945083838384929862494035
Published at
2024-07-16 04:41:21Event JSON
{
"id": "a9600adfc7a74f25129bc570523efbc6988de77035e521c365fc7637ec5d954c",
"pubkey": "d42a5c13222abccde8bd8b069c5bac5077cfe39fb8c422d308f9d4138eb769f2",
"created_at": 1721104881,
"kind": 1,
"tags": [
[
"proxy",
"https://hachyderm.io/users/robpike/statuses/112794329524261491",
"activitypub"
]
],
"content": "Wow, Chudnovsky's algorithm converges fast! I put it into ivy (code in the alt text) and the first term alone is good to 10 digits. Each term adds 30+ bits to the precision. Here the argument to chudpi is how many terms to sum.\n\n)get 'chudpi.ivy'\n\nchudpi 0\n3.1415926535897342076684535915782983407622\n\nlog pi - chudpi 0\n-30.4607171517456828366955039144850114298603\n\nlog pi - chudpi 10\n-357.9935248416118262945083838384929862494035\n\nhttps://media.hachyderm.io/media_attachments/files/112/794/329/318/234/450/original/e90536eaced004b8.png",
"sig": "a2b3c43ce9deeba0dbabebaa02f9bb3758350da1675f1882a6022ab6b77b36b7e2eb6857ff149b02c0cde466237bbc9f1987625a9a4b8e249d6e5a51bc33ab10"
}