吧务
level 15
……不太确定你是要干嘛。一般而言SetPrecision或者Rationalize只需要一次啊。(反复重设反而会把Mathematica自带的误差传递给整没了。)还是说,你不知道SetPrecision其实可以这样用?:
a = 1.2; g = 3.2;
s = NDSolve[SetPrecision[{y'[x] == a y[x] Cos[x + y[x]], y[0] == g}, Infinity],
y, {x, 0, 30}, WorkingPrecision -> 16]
2024年04月06日 07点04分
3