def test_sinh_cosh(self):
     assert sinh_cosh(0.5) == sinh_cosh(mpfr(0.5)) == (sinh(0.5), cosh(0.5))
     assert sinh_cosh(0) == (mpfr(0.0), mpfr(1.0))
     assert sinh_cosh(mpq(1, 3)) == (sinh(mpq(1, 3)), cosh(mpq(1, 3)))
     assert sinh_cosh(mpz(3)) == (sinh(mpz(3)), cosh(mpz(3)))
     with pytest.raises(TypeError):
         sinh_cosh([])
Example #2
0
 def test_sinh_cosh(self):
     assert sinh_cosh(0.5) == sinh_cosh(mpfr(0.5)) == (sinh(0.5), cosh(0.5))
     assert sinh_cosh(0) == (mpfr(0.0), mpfr(1.0))
     assert sinh_cosh(mpq(1, 3)) == (sinh(mpq(1, 3)), cosh(mpq(1, 3)))
     assert sinh_cosh(mpz(3)) == (sinh(mpz(3)), cosh(mpz(3)))
     with pytest.raises(TypeError):
         sinh_cosh([])
 def test_sinh(self):
     assert sinh(0.5) == mpfr('0.52109530549374738')
     assert sinh(0.5+0.7j) == mpc('0.39855567323751645+0.72643659137442362j')
Example #4
0
 def test_sinh(self):
     assert sinh(0.5) == mpfr('0.52109530549374738')
     assert sinh(0.5 +
                 0.7j) == mpc('0.39855567323751645+0.72643659137442362j')