       Re: Accuracy question

• To: mathgroup at smc.vnet.net
• Subject: [mg14105] Re: Accuracy question
• From: Robert Knapp <rknapp>
• Date: Fri, 25 Sep 1998 03:15:29 -0400
• Organization: Wolfram Research, Inc.
• References: <6tp1ij\$2tk@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Ersek, Ted R wrote:
>
> In the lines below SetPrecision[Round,False] makes it so Precision and
> accuracy return the actual floating point numbers that are used
> internally. \$NumberMarks=True, makes it so (among other things)
> InputForm[num] returns all digits used internally, and the precision
> marks at the end of inexact numbers.
>
> In:=
> SetPrecision[Round,False];
> \$NumberMarks=True;
> x=12345.67;
>
> Out shows exactly how Precision[x] is represented internally.  Out
> shows that Precision[x] is the number closest to  Log[10, 2^53].
>
> In:=
> Precision[x]//InputForm
>
> Out=
> 15.9545897701910028`
>
>
> In:=
> N[N[Log[10,2^53],17]]//InputForm
>
> Out=
> 15.9545897701910028`
>
> The next line shows exactly how Accuracy[x] is represented internally.
> Where does this number come from?
> Since accuracy is the number of digits to the right of the decimal I
> expect to get roughly 11.9.  But why
> ( 11.8630751061039617` )?
>
> In:=
> Accuracy[x]//InputForm
>
> Out=
> 11.8630751061039617`
>

The prinicpal you are looking for is

In:=
SetPrecision[Round,False];
\$NumberMarks=True;
x=12345.67;

In:=
Precision[x] - Accuracy[x]

Out=
4.09151

In:=
Log[10.,x]

Out=
4.09151

i.e. the difference between precision and accuracy is the scale (log
base 10 of the absolute value of the number)

```

• Prev by Date: Re: Fourier transform
• Next by Date: Re: Plotting (x,y,z) style data
• Previous by thread: Accuracy question
• Next by thread: HELP: Digital Unix 4.0 & Mathematica