from __future__ import annotations


def to_cents(amount: float) -> int:
    return int(round(float(amount) * 100))


def amounts_equal(a: float, b: float) -> bool:
    return to_cents(a) == to_cents(b)
