Ejemplo n.º 1
0
def test_continued_frac():
    assert continued_fraction(3245, 10000) == [0, 3, 12, 4, 13]
    assert continued_fraction(1932, 2568) == [0, 1, 3, 26, 2]
    assert continued_fraction(6589, 2569) == [2, 1, 1, 3, 2, 1, 3, 1, 23]
    assert getr(513, 1024, 10) == 2
    assert getr(169, 1024, 11) == 6
    assert getr(314, 4096, 16) == 13
Ejemplo n.º 2
0
def test_continued_frac():
    assert getr(513, 1024, 10) == 2
    assert getr(169, 1024, 11) == 6
    assert getr(314, 4096, 16) == 13
Ejemplo n.º 3
0
def test_continued_frac():
    assert getr(513, 1024, 10) == 2
    assert getr(169, 1024, 11) == 6
    assert getr(314, 4096, 16) == 13