def test_ADmath_arccosr(): f = ADmath.arccos(.3) assert f == np.arccos(.3)
def test_ADmath_arccos(): f = ADmath.arccos(ADnum(.3, der=1)) assert f.val == np.arccos(.3) assert f.der == -1 / (np.sqrt(1 - .3**2)) assert len(f.graph) == 1
def test_ADmath_arccosr(): f = ADmath.arccos(.3) assert f == np.arccos(.3)
def test_ADmath_arccos(): f = ADmath.arccos(ADnum(.3, der=1)) assert f.val == np.arccos(.3) assert f.der == -1 / (np.sqrt(1 - .3**2)) assert len(f.graph) == 1