-
Notifications
You must be signed in to change notification settings - Fork 0
Software to compute the famous irrational number pi.
License
jimirich/pi
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# pi Software to compute the famous irrational number pi. Included are two simple Java classes: PiLeibniz.java and PiNilakantha.java. PiLeibniz.java uses the Leibniz series to compute pi and PiNilakantha.java use the Nilakantha series. These classes were written as an exercise on Pi Day, 2023. PiNilakantha correctly computes pi to 27 digits and converges to the actual value of Pi much faster than PiLeibniz. After the same number of iterations, the Leibniz method is only accurate to 8 digits. Also included are two classes for computing Pi using the Nilakantha Series but using multiple threads. This allows for more speed with the same accuracy or more accuracy with about the same speed. As written, it performs 10000000000 iterations of the series in 10 threads.
About
Software to compute the famous irrational number pi.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published