Coverage Report

Created: 2025-09-27 06:45

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/libm-0.2.11/src/math/copysign.rs
Line
Count
Source
1
/// Sign of Y, magnitude of X (f64)
2
///
3
/// Constructs a number with the magnitude (absolute value) of its
4
/// first argument, `x`, and the sign of its second argument, `y`.
5
#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
6
0
pub fn copysign(x: f64, y: f64) -> f64 {
7
0
    let mut ux = x.to_bits();
8
0
    let uy = y.to_bits();
9
0
    ux &= (!0) >> 1;
10
0
    ux |= uy & (1 << 63);
11
0
    f64::from_bits(ux)
12
0
}