mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Merge pull request #3174 from dldks321/missing-cmath
Add `asinh` function to `cmath`
This commit is contained in:
2 files changed
+8
-2
No files matched your search
Vendored
+2
-2
@@ -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