Ejemplo n.º 1
0
def test_tan():
    """Boolean condition asserts that value and derivative of the tangent of the AutoDiff instance are equal to the expected value and derivative as calculated in the function for the case in which x is a real number.

    RETURNS
    ========
    If the boolean condition returns True nothing is returned. If it is computed to be false, then an AssertionError is raised.
    """
    c = 0.5
    assert {
        'diff': EF.tan(c).der,
        'value': EF.tan(c).val
    } == {
        'diff': 0,
        'value': math.tan(c)
    }
Ejemplo n.º 2
0
 def myfunc(x, y, z):
     a = (EF.sin(x))
     b = (EF.arccos(y))
     c = (EF.tan(z))
     return a + b + c