Esempio n. 1
0
def test_sanity_checks():
    assert (bm.log(4.1) == np.log(4.1))
    assert (bm.exp(-10.1) == np.exp(-10.1))
    assert (bm.sqrt(112.3) == np.sqrt(112.3))
    assert (bm.sin(4.1) == np.sin(4.1))
    assert (bm.cos(2.2) == np.cos(2.2))
    assert (bm.tan(2) == np.tan(2.0))
    assert (bm.arcsin(0) == np.arcsin(0))
    assert (bm.arccos(0.2) == np.arccos(0.2))
    assert (bm.arctan(2) == np.arctan(2))
    assert (bm.sinh(2) == np.sinh(2))
    assert (bm.cosh(2) == np.cosh(2))
    assert (bm.tanh(2) == np.tanh(2))
    assert (bm.logk(2, np.exp(1)) == np.log(2))
Esempio n. 2
0
def sinh_cosh(x, y):
    return bm.sinh(x) + bm.cosh(y)
Esempio n. 3
0
def cosh_fn(x, y):
    return -x * y * bm.cosh(x * y)