pub fn atanh(value: f64) -> Result<f64, DomainError>
Expand description
Computes the inverse hyperbolic tangent of the given value.
Domain: (-1, 1)
Codomain: (-INFINITY, INFINITY)
§Examples
use spinoso_math as math;
assert_eq!(math::atanh(1.0), Ok(f64::INFINITY));
assert!(math::atanh(100.0).is_err());
assert!(matches!(math::atanh(f64::NAN), Ok(result) if result.is_nan()));
§Errors
If the result of computing the inverse hyperbolic tangent is NAN
a domain error is returned.