def test_ADmath_cscr(): f = ADmath.csc(5) assert f == 1 / np.sin(5)
def test_ADmath_csc(): f = ADmath.csc(ADnum(5, der=1)) assert f.val == 1 / np.sin(5) assert f.der == (-1 / np.tan(5)) * (1 / np.sin(5)) assert len(f.graph) == 1
def test_ADmath_cscr(): f = ADmath.csc(5) assert f == 1 / np.sin(5)
def test_ADmath_csc(): f = ADmath.csc(ADnum(5, der=1)) assert f.val == 1 / np.sin(5) assert f.der == (-1 / np.tan(5)) * (1 / np.sin(5)) assert len(f.graph) == 1