Skip to content

Commit cedc718

Browse files
committed
Software div_euclid refactoring.
`f{16,32,64,128}/soft.rs` are now very similar. f32 and f64 almost identical. `U256` helper moved to `crate::u256`. `(-5f32).div_euclid(f32::INFINITY)` now returns -1 not 0.
1 parent 4534005 commit cedc718

29 files changed

+1670
-915
lines changed

library/std/src/f128.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
//!
55
//! Mathematically significant numbers are provided in the `consts` sub-module.
66
7-
mod div_euclid;
8-
mod u256;
7+
mod soft;
98

109
#[cfg(test)]
1110
mod tests;
@@ -271,7 +270,7 @@ impl f128 {
271270
#[unstable(feature = "f128", issue = "116909")]
272271
#[must_use = "method returns a new number and does not mutate the original value"]
273272
pub fn div_euclid(self, rhs: f128) -> f128 {
274-
div_euclid::div_euclid(self, rhs)
273+
soft::div_euclid(self, rhs)
275274
}
276275

277276
/// Calculates the least nonnegative remainder of `self (mod rhs)`.

library/std/src/f128/div_euclid.rs

-204
This file was deleted.

library/std/src/f128/div_euclid/tests.rs

-23
This file was deleted.

0 commit comments

Comments
 (0)