コード例 #1
0
 def test_log(self):
     assert log(0.5) == mpfr('-0.69314718055994529')
     assert log(0.5+0.7j) == mpc('-0.15055254639196086+0.95054684081207508j')
コード例 #2
0
 def test_log(self):
     assert log(0.5) == mpfr('-0.69314718055994529')
     assert log(0.5 +
                0.7j) == mpc('-0.15055254639196086+0.95054684081207508j')
コード例 #3
0
 def test_init_check(self):
     assert log(mpfr(0.5)) == log(mpq(1, 2)) == mpfr('-0.69314718055994529')
     assert log(2) == log(mpz(2)) == mpfr('0.69314718055994529')
     with pytest.raises(TypeError):
         log([])
コード例 #4
0
 def test_init_check(self):
     assert log(mpfr(0.5)) == log(mpq(1, 2)) == mpfr('-0.69314718055994529')
     assert log(2) == log(mpz(2)) == mpfr('0.69314718055994529')
     with pytest.raises(TypeError):
         log([])