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, [])
def test_discrete_draw_log_underflow(): discrete_draw_log([-1e3]) discrete_draw_log([-1e3, -1e-3])