Merge pull request #3174 from dldks321/missing-cmath

Add `asinh` function to `cmath`
This commit is contained in:
Jeong YunWon
2021-10-01 01:06:33 +09:00
committed by GitHub
2 changed files with 8 additions and 2 deletions

View File

@@ -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

View File

@@ -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)]