Rank: 47795 based on 0 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

Contact us at files@mathworks.com