# Machine-Precision and Arbitrary Precision [closed]

What is meant by a machine number in the Mathematica documentation? What is the difference between machine-precision and fixed-point precision? What is arbitrary precision?

• Have you read the tutorial on Numerical Precision? – Simon Woods Jun 19 '16 at 11:35
• @SimonWoods Oh I didn't see that. Thank you very much! – Undertherainbow Jun 19 '16 at 11:45
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Jun 19 '16 at 13:07
• Type in "arbitrary precision" in Mathematica's help browser and the second and third hit tell you all you need to know. The first one is relevant too. Same for a search on "machine precision". – Sjoerd C. de Vries Jun 19 '16 at 13:36

This is not an answer. But I don't believe we should close this question as "easily found in the documentation".

Numerics in Mathematica is an extremely complicated and mostly undocumented subject, where several mathematical concepts run up against each other in subtle and non-trivial ways. I have been thinking for some time that we ought to address this properly. Here is an outline for how I thought this could be approached.

There are three main headings, each containing enough material for several answers:

1. The formalist's view: floating-point numbers as rationals

• Decimal vs. binary digits
• $MachineEpsilon • SetPrecision and Rationalize • IEEE issues: Infinity/Indeterminate vs. Inf/NaN; rounding modes; LAPACK vs. C definition of $MachineEpsilon
2. Mathematica's view: floating-point numbers as distributions

• The nature of the distribution: interval arithmetic versus Gaussian error propagation
• $EqualTolerance; $SameQTolerance; InternalCompareNumeric
• Significance arithmetic and error propagation
3. Practicalities: floating-point numbers as a model of the reals

• Accuracy and Precision
• $MinPrecision/$MaxPrecision
• Dealing with numerically unstable functions
• Adaptive-precision evaluation; \$MaxExtraPrecision
• "CatchMachineUnderflow" system option
• PossibleZeroQ and associated system options "ZeroTestMaxPrecision" and "ZeroTestNumericalPrecision"

Anyone should feel free to add to these lists of topics in case I forgot anything. There are answers covering some of them already, but a lot of it is not widely known. I propose that, as a collaborative effort, we could address this question comprehensively (it's too much work for me to do by myself). This thread seems like a golden opportunity to do so.

• The challenge is to explain everything adequately without having to write an entire numerical analysis textbook… in any event, one will have to also consider whether a problem is due to an unstable algorithm or an ill-conditioned problem. – J. M. will be back soon Jun 19 '16 at 15:32
• @OleksandrR. what does InternalCompareNumeric do? – QuantumDot Sep 19 '16 at 1:32
• @QuantumDot InternalCompareNumeric[prec, a, b] returns -1, 0, or 1 according to whether a is less, equal, or greater than b when compared at the precision of a or b (whichever is less) minus prec decimal digits of "tolerance". It is the fundamental operation underlying Less, Equal, Greater, LessEqual` etc. for finite-precision numeric types. – Oleksandr R. Sep 19 '16 at 22:01