lz_log_e
The natural logarithm.
long lz_log_e( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );
Correctly rounded: a series after argument reduction, and at wide widths Newton on the exponential, or the arithmetic-geometric mean.
ln 0 has no value: kUndefinedResult, flagged infinite. The logarithm of a negative number is refused, kFailed, flagged not-a-number; lzc_log_e gives the complex one.
Examples
| Call | Answer | Returns |
|---|---|---|
lz_log_e( 2 ) | 0.693147180559945309417232121458176568 | kNoError |
lz_log_e( 10 ) 50 places | 2.30258509299404568401799145468436420760110148862877 | kNoError |
lz_log_e( 0.5 ) | −0.693147180559945309417232121458176568 | kNoError |
lz_log_e( 0 ) | infinite | kUndefinedResult |
lz_log_e( −5 ) | not a number | kFailed |
Each answer is what Addaptic printed for the call, at 36 places unless a setting is shown.
Returns
kNoError (0) when the answer is written. Otherwise an error code, with the answer flagged infinite or not-a-number; see Errors and flags.