Exemplo n.º 1
0
def test_cos_con():
    """Boolean condition asserts that value and derivative of cosine 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 = 14
    assert {
        'diff': EF.cos(c).der,
        'value': EF.cos(c).val
    } == {
        'diff': 0,
        'value': math.cos(c)
    }
Exemplo n.º 2
0
 def myfunc(x):
     f1 = EF.cos(x)
     return f1
Exemplo n.º 3
0
 def myfunc(x):
     a = (EF.cos(x))
     b = (EF.arcsin(x))
     c = (EF.arctan(x))
     return a - b + c