Fixed test to take rounding errors into account