diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2018-07-14 20:38:30 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2018-07-14 20:38:30 +0200 |
| commit | be219bee50f6943a73ad4d5c13d3a5dc810b5951 (patch) | |
| tree | 42b5ef7fae514a690a6aa89f98db53f59ecb1621 /library/compiler-builtins/libm/src/math/fmodf.rs | |
| parent | de0682bf64e0bc753b0bb82bffc8f66cad7faa31 (diff) | |
| parent | 932992a6970cebb6c5c689ac3577d0939caaa71c (diff) | |
| download | rust-be219bee50f6943a73ad4d5c13d3a5dc810b5951.tar.gz rust-be219bee50f6943a73ad4d5c13d3a5dc810b5951.zip | |
sync fork
Diffstat (limited to 'library/compiler-builtins/libm/src/math/fmodf.rs')
| -rw-r--r-- | library/compiler-builtins/libm/src/math/fmodf.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/library/compiler-builtins/libm/src/math/fmodf.rs b/library/compiler-builtins/libm/src/math/fmodf.rs index 90977524908..d84cfeb01b8 100644 --- a/library/compiler-builtins/libm/src/math/fmodf.rs +++ b/library/compiler-builtins/libm/src/math/fmodf.rs @@ -1,7 +1,6 @@ +use core::f32; use core::u32; -use super::isnanf; - #[inline] pub fn fmodf(x: f32, y: f32) -> f32 { let mut uxi = x.to_bits(); @@ -11,7 +10,7 @@ pub fn fmodf(x: f32, y: f32) -> f32 { let sx = uxi & 0x80000000; let mut i; - if uyi << 1 == 0 || isnanf(y) || ex == 0xff { + if uyi << 1 == 0 || y.is_nan() || ex == 0xff { return (x * y) / (x * y); } |
