Coverage Report

Created: 2026-03-12 06:29

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/rust/registry/src/index.crates.io-1949cf8c6b5b557f/libm-0.2.16/src/math/frexp.rs
Line
Count
Source
1
#[cfg_attr(assert_no_panic, no_panic::no_panic)]
2
0
pub fn frexp(x: f64) -> (f64, i32) {
3
0
    let mut y = x.to_bits();
4
0
    let ee = ((y >> 52) & 0x7ff) as i32;
5
6
0
    if ee == 0 {
7
0
        if x != 0.0 {
8
0
            let x1p64 = f64::from_bits(0x43f0000000000000);
9
0
            let (x, e) = frexp(x * x1p64);
10
0
            return (x, e - 64);
11
0
        }
12
0
        return (x, 0);
13
0
    } else if ee == 0x7ff {
14
0
        return (x, 0);
15
0
    }
16
17
0
    let e = ee - 0x3fe;
18
0
    y &= 0x800fffffffffffff;
19
0
    y |= 0x3fe0000000000000;
20
0
    return (f64::from_bits(y), e);
21
0
}