def test_basic(minuends_pair: BoundPortedRobustFloatsPair,
               subtrahends_pair: BoundPortedRobustFloatsPair) -> None:
    bound_minuend, ported_minuend = minuends_pair
    bound_subtrahend, ported_subtrahend = subtrahends_pair
    bound, ported = (BoundRobustDifference(bound_minuend, bound_subtrahend),
                     PortedRobustDifference(ported_minuend, ported_subtrahend))

    assert are_bound_ported_robust_differences_equal(bound, ported)
def test_basic(first_pair: BoundPortedRobustDifferencesPair,
               second_pair: BoundPortedRobustDifferencesOrFloatsPair) -> 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_robust_differences_equal(first_bound, first_ported)
def test_basic(pair: BoundPortedRobustDifferencesPair,
               robust_floats_pair: BoundPortedRobustFloatsPair) -> None:
    bound, ported = pair
    bound_robust_float, ported_robust_float = robust_floats_pair

    bound /= bound_robust_float
    ported /= ported_robust_float

    assert are_bound_ported_robust_differences_equal(bound, ported)
Beispiel #4
0
def test_basic(first_pair: BoundPortedRobustDifferencesPair,
               second_pair: BoundPortedRobustDifferencesOrFloatsPair) -> 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_robust_differences_equal(bound_result,
                                                     ported_result)
Beispiel #5
0
def test_basic(pair: BoundPortedRobustDifferencesPair) -> None:
    bound, ported = pair

    assert are_bound_ported_robust_differences_equal(-bound, -ported)