Bill Allombert on Tue, 15 Mar 2016 22:37:06 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Increasing precision


On Tue, Mar 15, 2016 at 05:22:49PM -0400, Charles Greathouse wrote:
> Suppose I have a function which needs guard digits. How can I increase the
> precision of an existing variable?
> 
> \p 100
> x=Pi;
> \p 19
> y=Pi;
> x-y \\ -2E-19: precision is about 19 digits
> x-precision(y,100) \\ -5E-20: precision is still about 19 digits

You are confused by the display...
Insert a \p100 afer y=Pi and you will see your example is correct.

Cheers,
Bill.