mirror of
https://github.com/MikeMcl/decimal.js.git
synced 2024-10-27 20:34:12 +00:00
test acosh
This commit is contained in:
parent
727eae8053
commit
2498123608
@ -30,7 +30,7 @@ def assert_matches(x, mpfunc, jsfunc=None):
|
|||||||
assert y == z
|
assert y == z
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("fn", "sin cos tan atan".split())
|
@pytest.mark.parametrize("fn", "sin cos tan atan asinh".split())
|
||||||
@given(
|
@given(
|
||||||
x=tuples(
|
x=tuples(
|
||||||
decimals(
|
decimals(
|
||||||
@ -62,7 +62,7 @@ def test_positive_domain(x, fn):
|
|||||||
assert_matches(x, fn)
|
assert_matches(x, fn)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("fn", "asin acos".split())
|
@pytest.mark.parametrize("fn", "asin acos atanh".split())
|
||||||
@given(
|
@given(
|
||||||
x=decimals(
|
x=decimals(
|
||||||
allow_nan=False, allow_infinity=False, min_value=-1, max_value=1, places=14
|
allow_nan=False, allow_infinity=False, min_value=-1, max_value=1, places=14
|
||||||
@ -85,3 +85,15 @@ def test_inverse_trig(x, fn):
|
|||||||
@settings(max_examples=1000)
|
@settings(max_examples=1000)
|
||||||
def test_small_domain(x, fn):
|
def test_small_domain(x, fn):
|
||||||
assert_matches(x, fn)
|
assert_matches(x, fn)
|
||||||
|
|
||||||
|
@given(
|
||||||
|
x=tuples(
|
||||||
|
decimals(
|
||||||
|
allow_nan=False, allow_infinity=False, min_value=1, max_value=10, places=14
|
||||||
|
),
|
||||||
|
integers(min_value=0, max_value=99),
|
||||||
|
).map(lambda tup: tup[0] * Decimal(10) ** tup[1])
|
||||||
|
)
|
||||||
|
@settings(max_examples=1000)
|
||||||
|
def test_acosh(x, fn):
|
||||||
|
assert_matches(x, 'acosh')
|
Loading…
Reference in New Issue
Block a user