Skip to main content
added 102 characters in body
Source Link
  1. Yes, the difference is constant.

  2. It is not really constant, but approximately, yes. With exceptions.

With binary floating point numbers, the expression (f(r)−r)/r$(f(r)−r)/r$ is constant within a factor of 2$2$. It is between $1 \over 2^m$ and $1 \over 2^{m-1}$ where m is the number of bits in the mantissa. For rounding error computationscalculations, you can assume it is constant.

A note on 0:
Obviously, you cannot apply the formula to r=0when $r=0$. But it is important to know that while f(r)-r$f(r)-r$ decreases when r$r$ becomes small, f(0)-0$f(0)-0$ is much larger than, for instance, f(f(r))-f(r)$f(f(r))-f(r)$. There is a huge non-representable gap around 0$0$.

  1. Yes, the difference is constant.

  2. It is not really constant, but approximately, yes. With exceptions.

With binary floating point numbers, the expression (f(r)−r)/r is constant within a factor of 2. For rounding error computations, you can assume it is constant.

A note on 0:
Obviously, you cannot apply the formula to r=0. But it is important to know that while f(r)-r decreases when r becomes small, f(0)-0 is much larger than, for instance, f(f(r))-f(r). There is a huge non-representable gap around 0.

  1. Yes, the difference is constant.

  2. It is not really constant, but approximately, yes. With exceptions.

With binary floating point numbers, the expression $(f(r)−r)/r$ is constant within a factor of $2$. It is between $1 \over 2^m$ and $1 \over 2^{m-1}$ where m is the number of bits in the mantissa. For rounding error calculations, you can assume it is constant.

A note on 0:
Obviously, you cannot apply the formula when $r=0$. But it is important to know that while $f(r)-r$ decreases when $r$ becomes small, $f(0)-0$ is much larger than, for instance, $f(f(r))-f(r)$. There is a huge non-representable gap around $0$.

Source Link

  1. Yes, the difference is constant.

  2. It is not really constant, but approximately, yes. With exceptions.

With binary floating point numbers, the expression (f(r)−r)/r is constant within a factor of 2. For rounding error computations, you can assume it is constant.

A note on 0:
Obviously, you cannot apply the formula to r=0. But it is important to know that while f(r)-r decreases when r becomes small, f(0)-0 is much larger than, for instance, f(f(r))-f(r). There is a huge non-representable gap around 0.