def test_ADmath_tanr(): f = ADmath.tan(4) assert f == np.tan(4)
def test_ADmath_tan(): f = ADmath.tan(ADnum(4, der=1)) assert f.val == np.tan(4) assert f.der == (1 / np.cos(4))**2 assert len(f.graph) == 1