Skip to content

Commit cb2ffdf

Browse files
authored
Merge pull request rust-lang#287 from keram88/master
2 parents 721a5ed + 8374538 commit cb2ffdf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/math/nextafter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn nextafter(x: f64, y: f64) -> f64 {
2323
ux_i += 1;
2424
}
2525

26-
let e = ux_i.wrapping_shr(52 & 0x7ff);
26+
let e = ux_i >> 52 & 0x7ff;
2727
// raise overflow if ux.f is infinite and x is finite
2828
if e == 0x7ff {
2929
force_eval!(x + x);

src/math/nextafterf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn nextafterf(x: f32, y: f32) -> f32 {
2323
ux_i += 1;
2424
}
2525

26-
let e = ux_i.wrapping_shr(0x7f80_0000_u32);
26+
let e = ux_i & 0x7f80_0000_u32;
2727
// raise overflow if ux_f is infinite and x is finite
2828
if e == 0x7f80_0000_u32 {
2929
force_eval!(x + x);

0 commit comments

Comments
 (0)