lz_log_gamma
The natural logarithm of the gamma function, ln Γ(x), for x above nought.
long lz_log_gamma( CLZNumber* leftOperand, CLZNumber* targetNumber = nullptr );
Correctly rounded, and it reaches arguments whose gamma function would be far past the answer limit: Γ(1000) itself has more than two thousand digits. At or below nought it is refused, kFailed, flagged not-a-number.
Examples
| Call | Answer | Returns |
|---|---|---|
lz_log_gamma( 10 ) | 12.801827480081469611207717874566706164 | kNoError |
lz_log_gamma( 0.5 ) | 0.572364942924700087071713675676529356 | kNoError |
lz_log_gamma( 1000 ) | 5905.220423209181211826076912361440789849 | kNoError |
lz_log_gamma( −0.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.
See also
lz_gammaThe gamma function, Γ(x).lz_factorialThe product of the whole numbers from one to the operand, n!.lz_log_eThe natural logarithm.