예제 #1
0
def test_basic(pair: BoundPortedBigFloatsPair) -> None:
    bound, ported = pair

    bound_result = bound.sqrt()
    ported_result = ported.sqrt()

    assert are_bound_ported_big_floats_equal(bound_result, ported_result)
예제 #2
0
def test_basic(first_pair: BoundPortedBigFloatsPair,
               second_pair: BoundPortedBigFloatsPair) -> None:
    first_bound, first_ported = first_pair
    second_bound, second_ported = second_pair

    bound_result = first_bound + second_bound
    ported_result = first_ported + second_ported

    assert are_bound_ported_big_floats_equal(bound_result, ported_result)
예제 #3
0
def test_basic(first_pair: BoundPortedBigIntsQuadrupletsPair,
               second_pair: BoundPortedBigIntsQuadrupletsPair) -> None:
    first_bound, first_ported = first_pair
    second_bound, second_ported = second_pair

    bound_result = bound(first_bound, second_bound)
    ported_result = ported(first_ported, second_ported)

    assert are_bound_ported_big_floats_equal(bound_result, ported_result)
예제 #4
0
def test_basic(first_pair: BoundPortedBigFloatsPair,
               second_pair: BoundPortedBigFloatsPair) -> None:
    first_bound, first_ported = first_pair
    second_bound, second_ported = second_pair

    first_bound -= second_bound
    first_ported -= second_ported

    assert are_bound_ported_big_floats_equal(first_bound, first_ported)
예제 #5
0
def test_basic(pair: BoundPortedBigFloatsPair) -> None:
    bound, ported = pair

    assert are_bound_ported_big_floats_equal(-bound, -ported)
예제 #6
0
def test_basic(value: float, exponent: int) -> None:
    bound, ported = (BoundBigFloat(value, exponent),
                     PortedBigFloat(value, exponent))

    assert are_bound_ported_big_floats_equal(bound, ported)