"Drew " <metuchen.premier@gmail.com> wrote in message <ji31vh$quh$1@newscl01ah.mathworks.com>...
> i want to do a calculation on pi and need to figure out how to remove digits sequentially from 3.14159.... then 3.4159..... then 3.159.... then 3.59....and so on to a finite number of steps any help greatly appreciated
         
Just to make sure there are no misunderstandings here, the 49digit number Nassar produced with 'num2strexact' is an exact decimal representation of matlab's best double precision approximation to pi. However that best value is only accurate out to about sixteen decimal places for the real pi. It is the best matlab can do using only 53 bits.
Here is pi out to about 100 places:
pi = 3.14159265358979323846264338327950288419716939937510 ...
5820974944592307816406286208998628034825342117068
As you see, it begins to differ from the 'num2strexact' output at the 16th place.
The mathematically exact pi is a transcendental number, which means that if it is expressed as a decimal fraction, that fraction never stops, nor are there ever any infinitely repeating cycles, such as in
41/333 = .123123123123123 ..... ,
nor is it even true that it can ever be expressed as the solution to any polynomial equation with rational coefficients.
Roger Stafford
