Rank: 45638 based on downloads (last 30 days) and 0 files submitted
photo

A Millo

E-mail

Personal Profile:

Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by A View all
Updated File Comments Rating
03 Nov 2009 cprintf - display formatted colored text in the Command Window Displays sprintf-formatted strings in the Command Window using the specified color/underline style Author: Yair Altman

29 Oct 2009 Calculate PI with Gauss-Legendre Calculate pi to "c" decimal places using the Gauss-Legendre algorithm. Author: Daniel Serrano

Ha, now I get it.
vpa function is a smart one, it regocnize pi by the first 16 digits and calculate pi to whatever digits you want.
try this:
my_pi = 3.141592653589793;
now compare:
vpa(pi,50)
and
vpa(my_pi)

also try
vpa(my_pi+1,50)

28 Oct 2009 Calculate PI with Gauss-Legendre Calculate pi to "c" decimal places using the Gauss-Legendre algorithm. Author: Daniel Serrano

I thoght that Vassili and John were right but I checked.
It works very well, even to 100000 digits.

28 Oct 2009 Calculate PI with Gauss-Legendre Calculate pi to "c" decimal places using the Gauss-Legendre algorithm. Author: Daniel Serrano

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com