Skip to content
/ pi Public

Software to compute the famous irrational number pi.

License

Notifications You must be signed in to change notification settings

jimirich/pi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

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

No packages published

Languages