Fix floating-point precision issue in an expectation