Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to increase the precision globally to 50 at least, but $MinPrecision does not work.

$MinPrecision = 50;
x = Sin[2.]
(* -> 0.909297 *)

(* -> MachinePrecision *)

How to set the working precision globally, i.e., make all the calculations in the notebook use the new precision?

share|improve this question
Hope this helps, have a look at:… – Kardashev3 Dec 1 '13 at 17:15
Precision settings only apply for arbitrary-precision values. When working with machine numbers, there is no tracking or adjustment of precision. So, enter your value as e.g. 2.`16 rather than 2. and you will get the effect you are after. – Oleksandr R. Dec 1 '13 at 17:27
My notebook involves machine precision numbers in many places; it would be tedious if I do the change like 2.`16 in every place. Is there a convenient way to set the precision once and for all? – renphysics Dec 1 '13 at 19:03
up vote 4 down vote accepted

This looks like a duplicate of my question here Global precision setting . Since I formulated it in a slightly different way, coming from Maple it might however be worth quoting the answer given by Mr. Wizard here. It worked for me in Mathematica 9 if there are no arbitary precision numbers in the notebook (defined as e.g. 2.`16):

$PreRead = (# /. 
 s_String /; 
   StringMatchQ[s, NumberString] && 
    Precision@ToExpression@s == MachinePrecision :> s <> "`50." &);

3/1.5 + Pi/7


This will act on all later commands before the actual command is executed and set the precision of contained numerical values to 50 digits.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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