[Date Index]
[Thread Index]
[Author Index]
Re: Loss of precision when using Simplify
*To*: mathgroup at smc.vnet.net
*Subject*: [mg36996] Re: Loss of precision when using Simplify
*From*: "Carl K. Woll" <carlw at u.washington.edu>
*Date*: Fri, 4 Oct 2002 05:01:47 -0400 (EDT)
*References*: <r01050400-1021-3E1702FCD74511D6BC1A00039380220E@[192.168.1.100]>
*Sender*: owner-wri-mathgroup at wolfram.com
Bill,
See my comments below.
>
> There is no logical reason to insist part of the expression to be exact
when another part is inexact. You cannot gain more precision than the least
precise portion of the expression. Further, there is extra processing
overhead associated with maintaining exact epressions as well as additional
storage requirements. For a simple expression such as your example the
additional overhead is insignificant. But it increases for every exact term
in the expression. It doesn't take all that many terms until the overhead
associate with exact computation becomes noticeable.
>
It seems to me that you are arguing that if you have an expression
consisting of one term which is very inprecise and another term which is
very precise or exact, then the total expression is only as precise as the
least precise portion of the expression. This is total nonsense. Consider
adding the following terms:
1.234567890123456`16 + 0.00000000000000001`1
consisting of one term with precision 16 and another term with precision 1.
By your argument, Mathematica should return an answer with only a single
digit of precision. Of course, Mathematica does no such thing.
> >Even more troubling (to me, at least) is the
> >following:
> >
> >x[0]+3x[1]/4+9x[2]/16+.4//Simplify
> >
> >0.4 + x[0] + 0.75 x[1] + 0.5625 x[2]
> >
> >I don't want Simplify to change my nice rational numbers to machine
> >number approximations.
>
> If you want exact answers you *must* have *all* terms in the expresssion
exact. Simply put either an expression is exact or not. No expression can be
exact unless *all* of the terms within it are exact.
When did I ever say that I wanted exact answers? In the example above, I
wanted Simplify to do nothing, that is, leave the expression as a sum of an
inexact quantity with some exact quantities.
In the work where this situation arose, the inexact quantities are typically
very small and the exact quantities are large, so that the precision of the
overall expression when extended precision numbers are substituted for the
x[i] is typically the same as the precision of the numbers being
substituted. For example, suppose x[0] and x[2] are zero, and x[1] is 1`25
10^25. Substituting these numbers into the original expression will yield a
result with a precision of 25, whereas substituting these numbers into the
simplified expression will only have a precision of 16. I've worked very
hard to keep the precision of my numbers as high as possible, and I don't
want Mathematica to arbitrarily turn those very high precision numbers into
much lower precision numbers.
Carl Woll
Physics Dept
U of Washington
Prev by Date:
**RE: Mathematica stole my X so I had to kill it**
Next by Date:
**RE: RE: Accuracy and Precision**
Previous by thread:
**Re: Loss of precision when using Simplify**
Next by thread:
**RE: Re: Loss of precision when using Simplify**
| |