Exemplo n.º 1
0
def test_discrete_draw_log():
    assert_equal(discrete_draw_log([-1.]), 0)
    assert_equal(discrete_draw_log([-1e3]), 0)
    assert_equal(discrete_draw_log([-1e-3]), 0)
    assert_equal(discrete_draw_log([-1., -1e3]), 0)
    assert_equal(discrete_draw_log([-1e3, -1.]), 1)
    assert_raises(Exception, discrete_draw_log, [])
Exemplo n.º 2
0
def test_discrete_draw_log():
    assert_equal(discrete_draw_log([-1.]), 0)
    assert_equal(discrete_draw_log([-1e3]), 0)
    assert_equal(discrete_draw_log([-1e-3]), 0)
    assert_equal(discrete_draw_log([-1., -1e3]), 0)
    assert_equal(discrete_draw_log([-1e3, -1.]), 1)
    assert_raises(Exception, discrete_draw_log, [])
Exemplo n.º 3
0
def test_discrete_draw_log_underflow():
    discrete_draw_log([-1e3])
    discrete_draw_log([-1e3, -1e-3])
Exemplo n.º 4
0
def test_discrete_draw_log_underflow():
    discrete_draw_log([-1e3])
    discrete_draw_log([-1e3, -1e-3])