I want to do various computations conditional on a given precision for the entire notebook. I use the following code:
Block[{$MaxPrecision = 3},
SetPrecision[{"various computations"},3]
]
All of the computations are placed in SetPrecision[{...},3]
. The output from the above code seems fine but when I use Enter
key then the numbers look as if no precision is applied.
Furthermore, how can I override Default Precision
with $MaxPrecision=3
?
initialVariable = 1`3
then any calculations that involve that value will automatically keep track of the appropriate precision. $\endgroup$mat
of numbers. This matrix is used in the computation of variables in the successive steps in the code. How do I set the precision of the matrixmat
? $\endgroup$SetPrecision[mat, 3]
would do it. I don't believe there is a "global precision setting" in the sense you intend. Can you explain a bit more why you think you need it? If you want speed, then machine-precision is your best bet anyway, $\endgroup$$MaxPrecision
is set, some computations may not get correct results" because a higher precision than requested would be required to obtain the correct result. The latter drawback would be a show-stopper to me. $\endgroup$