pub fn euler_gamma<T: Into<f64>>(z: T, precision: f64) -> f64
Expand description

The gamma function Γ(z) for all z ∈ ℝ \ {-1}.

Arguments

  • z: T - The function value to be computed.
  • precision: f64 - The precision of the computation. Numbers of the form 10^n with n ∈ ℤ⁻ roughly give a precision of 10^((n / 2) - 1).

Examples

use lib_rapid::math::general::{euler_gamma, delta};
 
assert!(delta(euler_gamma( 1.6, 1e-12), 0.8935153492876903) < 1e-5);
assert!(delta(euler_gamma(-1.6, 1e-12), 2.3105828580809252) < 1e-5);