Re: SetPrecision - What does in find?
- To: mathgroup at smc.vnet.net
- Subject: [mg48605] Re: SetPrecision - What does in find?
- From: ab_def at prontomail.com (Maxim)
- Date: Mon, 7 Jun 2004 05:33:38 -0400 (EDT)
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
There's a glitch in SetPrecision[n,Infinity] though: it doesn't preserve the hidden digits of n. Suppose we have n=1`20/3; Mathematica will generate a number with 40 threes, 20 of which will be significant. Now if we do SetPrecision[n,50], then Mathematica firstly will use the hidden digits and only after that the number will be padded with zeros. This means that SetPrecision[n,50]-1/3 is approximately 10^-40: In:= SetPrecision[1`20/3, 50] - 1/3 // N Out= -9.795786256852395*^-40 This works just as described in the documentation; but if we do SetPrecision[n,Infinity], then only the 20 significant digits are used: In:= SetPrecision[1`20/3, Infinity] - 1/3 // N Out= 5.646886315028669*^-22 Maxim Rytin m.r at inbox.ru