diff --git a/src/float/extend.rs b/src/float/extend.rs index 1abb23c..a71b7a1 100644 --- a/src/float/extend.rs +++ b/src/float/extend.rs @@ -41,7 +41,7 @@ fn extend(a: F) -> R where let abs_dst: R::Int = a_abs.cast(); let bias_dst: R::Int = exp_bias_delta.cast(); abs_result = abs_dst.wrapping_shl(sign_bits_delta); - abs_result |= bias_dst.wrapping_shl(dst_sign_bits); + abs_result += bias_dst.wrapping_shl(dst_sign_bits); } else if a_abs >= src_infinity { // a is NaN or infinity. // Conjure the result by beginning with infinity, then setting the qNaN diff --git a/testcrate/build.rs b/testcrate/build.rs index 9269983..40cc1db 100644 --- a/testcrate/build.rs +++ b/testcrate/build.rs @@ -703,6 +703,9 @@ macro_rules! gen_float { // Special values *rng.choose(&[-0.0, 0.0, + ::std::$fty::MIN, + ::std::$fty::MIN_POSITIVE, + ::std::$fty::MAX, ::std::$fty::NAN, ::std::$fty::INFINITY, -::std::$fty::INFINITY]) @@ -754,6 +757,9 @@ macro_rules! gen_large_float { // Special values *rng.choose(&[-0.0, 0.0, + ::std::$fty::MIN, + ::std::$fty::MIN_POSITIVE, + ::std::$fty::MAX, ::std::$fty::NAN, ::std::$fty::INFINITY, -::std::$fty::INFINITY])