Skip to content

Commit 3ebdd59

Browse files
authored
Rollup merge of rust-lang#141669 - tgross35:float-test-cleanup, r=RalfJung
float: Replace some approximate assertions with exact As was mentioned at [1], we currently use `assert_approx_eq` for testing some math functions that guarantee exact results. Replace approximate assertions with exact ones for the following: * `ceil` * `floor` * `fract` * `from_bits` * `mul_add` * `round_ties_even` * `round` * `trunc` This likely wasn't done in the past to avoid writing out exact decimals that don't match the intuitive answer (e.g. 1.3 - 1.0 = 0.300...004), but ensuring our results are accurate seems more important here. [1]: rust-lang#138087 (comment) The first commit is a small bit of macro cleanup. try-job: aarch64-gnu try-job: x86_64-gnu-aux
2 parents 5023691 + 70cce1c commit 3ebdd59

File tree

5 files changed

+680
-717
lines changed

5 files changed

+680
-717
lines changed

0 commit comments

Comments
 (0)