Sha256: 2e2593ae8002ba420809ebfaf737ef001cdc912354be3d978a8c0cb930350d4d

Contents?: true

Size: 485 Bytes

Versions: 11

Compression:

Stored size: 485 Bytes

Contents

pub fn frexpf(x: f32) -> (f32, i32) {
    let mut y = x.to_bits();
    let ee: i32 = ((y >> 23) & 0xff) as i32;

    if ee == 0 {
        if x != 0.0 {
            let x1p64 = f32::from_bits(0x5f800000);
            let (x, e) = frexpf(x * x1p64);
            return (x, e - 64);
        } else {
            return (x, 0);
        }
    } else if ee == 0xff {
        return (x, 0);
    }

    let e = ee - 0x7e;
    y &= 0x807fffff;
    y |= 0x3f000000;
    (f32::from_bits(y), e)
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/libm-0.2.11/src/math/frexpf.rs
wasmtime-28.0.0 ./ext/cargo-vendor/libm-0.2.11/src/math/frexpf.rs
wasmtime-27.0.0 ./ext/cargo-vendor/libm-0.2.11/src/math/frexpf.rs
wasmtime-26.0.0 ./ext/cargo-vendor/libm-0.2.8/src/math/frexpf.rs
wasmtime-25.0.2 ./ext/cargo-vendor/libm-0.2.8/src/math/frexpf.rs
wasmtime-25.0.1 ./ext/cargo-vendor/libm-0.2.8/src/math/frexpf.rs
wasmtime-25.0.0 ./ext/cargo-vendor/libm-0.2.8/src/math/frexpf.rs
wasmtime-24.0.0 ./ext/cargo-vendor/libm-0.2.8/src/math/frexpf.rs
wasmtime-23.0.2 ./ext/cargo-vendor/libm-0.2.8/src/math/frexpf.rs
wasmtime-22.0.0 ./ext/cargo-vendor/libm-0.2.8/src/math/frexpf.rs
wasmtime-21.0.1 ./ext/cargo-vendor/libm-0.2.8/src/math/frexpf.rs