Esempio n. 1
0
 def test_expm1(self):
     assert_almost_equal(ncu.expm1(0.2), ncu.exp(0.2) - 1)
     assert_almost_equal(ncu.expm1(1e-6), ncu.exp(1e-6) - 1)
Esempio n. 2
0
 def test_special(self):
     assert_equal(ncu.expm1(np.inf), np.inf)
     assert_equal(ncu.expm1(0.), 0.)
     assert_equal(ncu.expm1(-0.), -0.)
     assert_equal(ncu.expm1(np.inf), np.inf)
     assert_equal(ncu.expm1(-np.inf), -1.)
 def test_expm1(self):
     assert_almost_equal(ncu.expm1(0.2), ncu.exp(0.2) - 1)
     assert_almost_equal(ncu.expm1(1e-6), ncu.exp(1e-6) - 1)
Esempio n. 4
0
 def test_special(self):
     assert_equal(ncu.expm1(np.inf), np.inf)
     assert_equal(ncu.expm1(0.0), 0.0)
     assert_equal(ncu.expm1(-0.0), -0.0)
     assert_equal(ncu.expm1(np.inf), np.inf)
     assert_equal(ncu.expm1(-np.inf), -1.0)