Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

An example of a domain error is the square root of a negative number, such as sqrt(-1.0), which has no meaning in real arithmetic. On the other hand, ten raised to the one-millionth power, pow(10., 1e6), likely cannot  cannot be represented in an implementation's floatingmany implementations' floating-point representation and consequently constitutes a range error. In both cases, the function will return some value, but the value returned is not the correct result of the computation.  An example of a pole error is log(0.0), which results in negative infinity.

...