mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Merge pull request #3174 from dldks321/missing-cmath
Add `asinh` function to `cmath`
This commit is contained in:
4
Lib/test/test_cmath.py
vendored
4
Lib/test/test_cmath.py
vendored
@@ -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
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user