Re: Loss of precision
- To: mathgroup at smc.vnet.net
- Subject: [mg126684] Re: Loss of precision
- From: danl at wolfram.com
- Date: Thu, 31 May 2012 02:46:32 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jpnhi8$qa4$1@smc.vnet.net> <jpq6t7$6vs$1@smc.vnet.net> <jq265m$6jt$1@smc.vnet.net>
On Tuesday, May 29, 2012 4:50:46 AM UTC-5, Richard Fateman wrote: > On 5/26/2012 2:14 AM, danl at ... wrote: > > On Friday, May 25, 2012 3:57:44 AM UTC-5, sam.... at yahoo.com wrote: > >> Hi, > >> > >> I understand intuitively why Sin[Large Number] cannot be computed too accurately. For example > >> > >> Precision[Sin[SetPrecision[10^10, 100]]] = 89.75 > >> > >> We can I find an explanation of precisely why and how 100 becomes 89.75. > > Sin[Large Number] can be computed accurately to any desired number of > digits. Just as one can compute pi to any specified number of digits, > one can compute 10^10 or 10^100 modulo pi/2 to any specified number of > digits. > > Daniel does describe what Mathematica does, which is hardly > mathematically or computationally inevitable. > RJF The operand in question was not 10^10, but rather a finite precision approximation thereto. Once you pin the precision of the operand to a finite value, you are subject to precision loss. If your convention is that, for example, .001 "really" means .001000000... then of course it is a different matter, because you have not pinned the precision to something finite. As you observe, tacitly, that's not what Mathematica does. Daniel Lichtblau Wolfram Research