1

In Wolfram Alpha:

plot -EXP(t)/2 LN((EXP(t)-1)/(EXP(t)+1)) from t=0 to t=40

Round-off

Is this how round off errors appear in solutions when subtraction operand orders of magnitude differ more than 2^24 (32-bit float) ?

Link: Equation Plot

Link: What Every Computer Scientist Should Know About Floating-Point Arithmetic

4

1 回答 1

0

基本上,是的,尽管减法隐藏在计算中,并且数据类型是双精度数,而不是浮点数。

对于大t(exp(t)-1)/(exp(t)+1)本质上是1 - 2exp(-t),其对数非常接近-2exp(-t)。但是,因为2exp(-t)与 相比是如此之小1,所以大多数精度位都会在传递给对数的值中丢失,这会导致您观察到的所有噪声。

于 2012-09-21T18:05:25.067 回答