Compares two classic methods of computing the value of pi.
Updated 7 Apr 2018

View License

The classic Gregory-Leibnitz infinite series method of calculating pi comes to us from 17th century Europe. But much earlier, in 15th century India, a genius named Nilakantha had developed an infinite series method that was faster-converging. (Imagine these people, doing this kind of work without a Macbook Pro?) This script compares the two methods for any given number of series terms. My next project is to graph their output, term by term, and hopefully to color code the lines to compare the progression of time.

Cite As

Bud Kelly (2024). mypicalculator4 (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Logical in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes