Tag Info

New answers tagged

2

If you can tolerate some slowdown, use arbitrary-precision numbers instead of machine-precision numbers. Unlike machine-precision numbers, arbitrary-precision numbers keep track of how error propagate through a calculation. Let's see what happens when we try your NSolve after setting the precision explicitly: NSolve[SetPrecision[LaguerreL[50, x], ...


8

ybeltukov showed empirically that $g(x)$ is numerically more precise than $f(x)$, despite the two expressions being formally mathematically equal. Why is this the case? In your original question, you guessed that If you could explain why, that would really help me out, I have a feeling it's f(x) as there isn't a denominator but I'm not 100% certain. ...


10

You can compare the precision empirically: prec[f_, x_] := Abs[SetPrecision[f[x], 30] - f[SetPrecision[x, 30]]]/ Abs@f[SetPrecision[x, 30]]; LogPlot[{prec[f, x], $MachineEpsilon}, {x, -10, 10}] LogPlot[{prec[g, x], $MachineEpsilon}, {x, -10, 10}] So g has better numerical precision (around $MachineEpsilon). It is because f contains the ...


5

Try the following, N[NestList[Cos, 15/10, 10], 10] {* {1.500000000,0.07073720167,0.9974991672,0.5424049923,0.8564697089,0.6551088018, 0.7929816458,0.7017241683,0.7637303113,0.7222610821,0.7503128857} *} SetAccuracy[NestList[Cos, 1.5, 10], 10]; SetPrecision[NestList[Cos, 1.5, 10], 10]; NumberForm[NestList[Cos, 1.5, 10], {10, 10}] {* ...



Top 50 recent answers are included