diff options
Diffstat (limited to 'library/compiler-builtins/libm/src/math/lgamma.rs')
| -rw-r--r-- | library/compiler-builtins/libm/src/math/lgamma.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/compiler-builtins/libm/src/math/lgamma.rs b/library/compiler-builtins/libm/src/math/lgamma.rs new file mode 100644 index 00000000000..8312dc18648 --- /dev/null +++ b/library/compiler-builtins/libm/src/math/lgamma.rs @@ -0,0 +1,8 @@ +use super::lgamma_r; + +/// The natural logarithm of the +/// [Gamma function](https://en.wikipedia.org/wiki/Gamma_function) (f64). +#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)] +pub fn lgamma(x: f64) -> f64 { + lgamma_r(x).0 +} |
