7
$\begingroup$

What does it mean to have a negative accuracy number?

I understand 0``128 to mean "the number zero to 128 decimal points". Mathematica corroborates this:

In[1]:= 0``128 < 1
(* Out[1]= True *)
In[2]:= 0``128 < 0
(* Out[2]= False *)
In[3]:= Accuracy[0``128]
(* Out[3]= 128. *)

But then I have no idea what "negative accuracy" is:

In[1]:= 0``-128 < 1
(* Out[1]= False *)
In[2]:= 0``-128 > 1
(* Out[2]= False *)
In[3]:= 0``-128 == 1
(* Out[3]= True *)     (* Why????? *)
In[4]:= Accuracy[0``-128]
(* Out[4]= -128. *)

Context: these values are showing up in a system of ~10000 equations, as the result of computing 100s of expressions of the form

$$ \sum_i \frac{\textrm{numer}}{\textrm{denom}} \textrm{basis}_i, $$

where both numer and denom are randomly generated complex numbers, with 200 digit precision. I then collect coefficients of the (symbolic) $\textrm{basis}_i$'s to form algebraic equations.

The 0``128 objects appear in only a handful of the total number of equations, so I don't yet know what causes the 0``-128's to appear.

$\endgroup$
  • 8
    $\begingroup$ From the docs: "...The accuracy of a number can be negative, indicating that all the correctly known digits are to the left of the decimal point..." $\endgroup$ – ciao May 6 '15 at 0:29
  • 2
    $\begingroup$ Ah, thanks @ciao. I "ctrl+f" ' d through every page (except that one apparently). It's here, for posterity. $\endgroup$ – jjstankowicz May 6 '15 at 0:36
1
$\begingroup$

For the sake of an answer:

From the docs: "...The accuracy of a number can be negative, indicating that all the correctly known digits are to the left of the decimal point..." – ciao May 6 '15 at 0:29

In other words, the error in 0``a is at most 10^-a. So 0``-128 represents a numeric quantity at most 10^128 in magnitude.

Example:

N[10^148 (1 + 9*^-21), 20] - 10^148 // InputForm
(*  0``-128.  *)

And the error is less than 10^128:

10^148 * 9 * 10^-21 // N
(*  9.*10^127  *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.