diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-05-28 01:22:53 +0000 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-05-29 21:13:26 +0000 |
| commit | 9907c5a806cb8645b39cf6a7e2442224e521ea24 (patch) | |
| tree | edd6124b0f7e67373db7422cc573af5819448584 /compiler/rustc_codegen_gcc/example/alloc_system.rs | |
| parent | 6a79b272ba5edbb79d57cc96de8c9b363894e3fc (diff) | |
| download | rust-9907c5a806cb8645b39cf6a7e2442224e521ea24.tar.gz rust-9907c5a806cb8645b39cf6a7e2442224e521ea24.zip | |
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]: https://github.com/rust-lang/rust/pull/138087#issuecomment-2842069281
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/alloc_system.rs')
0 files changed, 0 insertions, 0 deletions
