예제 #1
0
def rm_test_cosh():
    Test_Dual_Number_1 = DualNumber(1,Reverse=True)
    assert EF.Cosh(Test_Dual_Number_1).val == np.cosh(1) and EF.Cosh(Test_Dual_Number_1).der == 0
예제 #2
0
def test_cosh():
    Test_Dual_Number_1 = DualNumber(1)
    assert EF.Cosh(Test_Dual_Number_1).val == np.cosh(1) and EF.Cosh(Test_Dual_Number_1).der == np.sinh(1)
    Test_Dual_Number_1 = 1
    assert EF.Cosh(Test_Dual_Number_1).val == np.cosh(1) and EF.Cosh(Test_Dual_Number_1).der == 0