exp package:base

exponent corresponds to the second component of decodeFloat. exponent 0 = 0 and for finite nonzero x, exponent x = snd (decodeFloat x) + floatDigits x. If x is a finite floating-point number, it is equal in value to significand x * b ^^ exponent x, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.
expm1 x computes exp x - 1, but provides more precise results for small (absolute) values of x if possible.
Arguments which look like @foo will be replaced with the contents of file foo. A gcc-like syntax for response files arguments is expected. This must re-constitute the argument list by doing an inverse of the escaping mechanism done by the calling-program side. We quit if the file is not found or reading somehow fails. (A convenience routine for haddock or possibly other clients)
log1mexp x computes log (1 - exp x), but provides more precise results if possible. Examples:
  • if x is a large negative number, log (1 - exp x) will be imprecise for the reasons given in log1p.
  • if exp x is close to 1, log (1 - exp x) will be imprecise for the reasons given in expm1.
log1pexp x computes log (1 + exp x), but provides more precise results if possible. Examples:
  • if x is a large negative number, log (1 + exp x) will be imprecise for the reasons given in log1p.
  • if exp x is close to -1, log (1 + exp x) will be imprecise for the reasons given in expm1.
Parse a single lexeme
Default implementation for log1mexp requiring Ord to test against a threshold to decide which implementation variant to use.