diff --git a/Lib/test/test_cmath.py b/Lib/test/test_cmath.py index 0f4d1c743..080d31c95 100644 --- a/Lib/test/test_cmath.py +++ b/Lib/test/test_cmath.py @@ -56,8 +56,8 @@ class CMathTests(unittest.TestCase): # # list of all functions in cmath test_functions = [getattr(cmath, fname) for fname in [ - 'sin','cos','log','log10','sqrt','acosh','tan','tanh' - # 'exp','acos','asin','asinh', + 'sin','cos','log','log10','sqrt','acosh','tan','tanh','asinh' + # 'exp','acos','asin', # 'atan','atanh','sinh','cosh' ]] # test first and second arguments independently for 2-argument log diff --git a/vm/src/stdlib/cmath.rs b/vm/src/stdlib/cmath.rs index 6e28ec333..18be58304 100644 --- a/vm/src/stdlib/cmath.rs +++ b/vm/src/stdlib/cmath.rs @@ -120,6 +120,12 @@ mod cmath { z.to_complex().tanh() } + /// Return the inverse hyperbolic sine of z. + #[pyfunction] + fn asinh(z: IntoPyComplex) -> Complex64 { + z.to_complex().asinh() + } + #[derive(FromArgs)] struct IsCloseArgs { #[pyarg(positional)]