Coming from Maple I do not understand how the precision for numerical computations in Mathematica is specified. I understand that there are various options to commands such as WorkingPrecision and PrecisionGoal. But I would like to use the same precision (above machine precision) for a number of computations including matrix operations and the FindRoot command outside and inside of routines. Also I would like to specify the precision of the output.
Tell me more
×
Mathematica Stack Exchange is a question and answer site for
users of Mathematica. It's 100% free, no registration required.
|
|
||||
You could force this with
|
|||
|
|

?$*Precision. You can do fixed precision calculations withBlock[{$MaxPrecision=..., $MinPrecision=...}, ...]or set these globally to affect all functions that rely on it – rm -rf♦ Jun 4 '12 at 19:501.0`20. Also, you should be aware that some matrix decompositions are done in machine precision using LAPACK. – Oleksandr R. Jun 4 '12 at 20:12SetPrecisionwill take the machine-precision value and extend it with base-2 zeros up to the required precision, which may not be what you want (since zeros in base 2 are not necessarily so in base 10; e.g.SetPrecision[1.9, 20]gives a result slightly less than 1.9). If you use the annotation, the zeros are taken to be in base 10 instead. Another possible approach is to useRationalize. – Oleksandr R. Jun 4 '12 at 21:53