Re: How to increase Working Precision?



On Mar 8, 10:21 am, rjf <fate...@xxxxxxxxx> wrote:
Just to add to C Creutzig's note;  it should be clear that the
absolute error of a result is the (absolute value) of the difference
between the result and the correct value.  The number of decimal or
binary places used to represent the result is something else.

I think we are all in vehement agreement that

3.15000000000000000000000000000000

is fairly a precise number, but one which is not terribly accurate as
an estimate of pi.


The notions of relative error and absolute error, as well as
precision, should be defined in any text on numerical analysis.

Mathematica's notions of Precision and Accuracy are not found in
contemporary NA books; they are related to significance arithmetic, no
longer in use except in Mathematica.
Why?

Why is significance arithmetic used in Mathematica?

Because we find that it works quite well. Most or all of bignum
Mathematica code is written to use this underlying arithmetic. To
change that model would incur a considerable burden of code overhaul,
with no gain that I can discern.

If you are asking why significance arithmetic is not used elsewhere, I
can point out that it takes serious code infrastructure to work in
anything approaching a full-fledged manner. I guess I can also note
that I am not certain it is unused elswhere; I can only say I am
unaware of other such usage.

To refine a statement you make, Mathematica's Precision and Accuracy
are features of a number, corresponding approximately to number of
digits and number of digits to right of radix. How they change, and
more generally, how error propagates in Mathematica arithmetic, is a
feature of significance arithmetic. I think textbooks tend to
associate precision/accuracy with computations rather than with
numbers. But I do not see a profound inconsistency in using these
notions on numbers themselves.


I came across this ..http://www.av8n.com/physics/uncertainty.htm#sec-abomination
which might be of some interest.

The point is, "ambiguity is not an advantage".

RJF

I'll show some Mathematica code and results to emulate that example.
Significance arithmetic gives what I claim to be quite reasonable
results.

The example involves finding the quotient 10.065/9.95. I will first
indicate what interval arithmetic has to say. We are to assume all
values in the example above are correct to the last shown digit; the
intervals below are formulated with that in mind.

e1 = 10065/1000;
e2 = 995/100;
ee1 = e1 + Interval[{-5/10000, 5/10000}];
ee2 = e2 + Interval[{-5/1000, 5/1000}];

The interval values are as we expect.

In[182]:= N[{ee1, ee2}]
Out[182]= {Interval[{10.0645, 10.0655}], Interval[{9.945, 9.955}]}

So let's take a look at the quotient.

In[183]:= int = ee1/ee2;
N[int]

Out[184]= Interval[{1.011, 1.01212}]

Now we do similarly but with significance arithmetic. First I show the
numbers we will use.

In[185]:= {10.065`5, 9.95`3}
Out[185]= {10.065, 9.95}

Here is the quotient, both as it displays and in Mathematica's
InputForm.

In[186]:= quot = 10.065`5/9.95`3;
{quot, InputForm[quot]}

Out[187]= {1.01, 1.0115577889447236183`2.9956786262173565}

We see that around three digits are "correct", and this agrees quite
well with the interval analysis (which indicates fairly clearly that
the next digit is not known).

Notice we have, to small precision, an idea of how far the result is
from the exact 101/100:

In[190]:= InputForm[quot-101/100]
Out[190]//InputForm=
0.0015577889447236183`0.1831965451629747

As best I can tell, significance arithmetic is giving a perfectly good
result.

Daniel Lichtblau
Wolfram Research
.



Relevant Pages

  • Re: How to increase Working Precision?
    ... arbitrary precision in applied situations is quite ... not 10 problems, each 10 digits. ... the machine-arithmetic subroutine library of Mathematica, ... iterations I've suggested than the 1-2 or 3 arithmetic ...
    (sci.math.symbolic)
  • Re: How to increase Working Precision?
    ... arbitrary precision in applied situations is quite ... not 10 problems, each 10 digits. ... better off using fixed precision. ... the machine-arithmetic subroutine library of Mathematica, ...
    (sci.math.symbolic)
  • Re: notion of numerical precision in M resp. MMA
    ... over fixed precision (such as the floating-point or integer ... This means that with Mathematica, unlike other software, you always ... get both a numerical result and the knowledge of to how many digits ... Numerical-precision control--specified input mode, ...
    (sci.math.symbolic)
  • Re: A NEW (draft) review of Mathematica (6)
    ... That's what mathematica says, and some people may believe it. ... if 20 digits are known at the start, ... You can also emulate fixed precision calculations: ... Significance arithmetic is inspired by a physics lab where you are ...
    (sci.math.symbolic)
  • Re: float bug? perl 5.8, DBI and oracle 10.2.0
    ... precision numbers in oracle, you've got 38 decimal digits to play ... and with minimal coaxing perl will handle them as ... digits from a 32 bit floating point number - I'll go out on a limb ... and hazard that one can expect 12 or so digits from a 64 bit floating ...
    (perl.dbi.users)