I need to optimize an expression that involves a number of trigonometric functions and Exp[]
. How do I make sure that all my calculations have an accuracy of 120-200 digits after the decimal point? This includes the accuracy of Exp[]
and trig functions.
To get my point across, here is part of the equation:
z[x_, y_]:= Exp[Sin[60.0*x]] + Sin[50.0*Exp[y]]
Mathematica lets you control Precision
of computations (which is total number of digits in the number) with two global variables: $MinPrecision
and $MaxPrecision
. However, I am not looking for precision.
NestList[16 # (1 - #)/3 &, 1/5, 4]
? Though for heavy computations you will lose speed. $\endgroup$N[expr, {Infinity, accuracy}]
might be the way to go, assuming the inputs are known to sufficient precision. (If the inputs are aren't, then you cannot know the result to the desired accuracy.) $\endgroup$