pub fn nextafterf(x: f32, y: f32) -> f32 {
    let mut cxi = (if x == 0. { mulsignf(0., y) } else { x }).to_bits() as i32;
    let c = (cxi < 0) == (y < x);
    if c {
        cxi = -(cxi ^ (1 << 31));
    }

    if x != y {
        cxi -= 1;
    }

    if c {
        cxi = -(cxi ^ (1 << 31));
    }

    let cxf = f32::from_bits(cxi as u32);

    if x.is_nan() || y.is_nan() {
        f32::NAN
    } else if (x == 0.) && (y == 0.) {
        y
    } else if (cxf == 0.) && (x != 0.) {
        mulsignf(0., x)
    } else {
        cxf
    }
}
/// Find the next representable FP value
Find the next representable FP value
Find the next representable FP value
pub fn nextafterf(x: f32, y: f32) -> f32 {
    let mut cxi = (if x == 0. { mulsignf(0., y) } else { x }).to_bits() as i32;
    let c = (cxi < 0) == (y < x);
    if c {
        cxi = -(cxi ^ (1 << 31));
    }
    if x != y {
        cxi -= 1;
    }
    if c {
        cxi = -(cxi ^ (1 << 31));
    }
    let cxf = f32::from_bits(cxi as u32);
    if x.is_nan() || y.is_nan() {
        f32::NAN
    } else if (x == 0.) && (y == 0.) {
        y
    } else if (cxf == 0.) && (x != 0.) {
        mulsignf(0., x)
    } else {
        cxf
    }
}
pub fn nextafterf ( x : f32 , y : f32 ) -> f32 { let mut cxi = ( if x == 0. { mulsignf ( 0. , y ) } else { x } ) . to_bits ( ) as i32 ; let c = ( cxi < 0 ) == ( y < x ) ; if c { cxi = - ( cxi ^ ( 1 << 31 ) ) ; } if x != y { cxi -= 1 ; } if c { cxi = - ( cxi ^ ( 1 << 31 ) ) ; } let cxf = f32 :: from_bits ( cxi as u32 ) ; if x . is_nan ( ) || y . is_nan ( ) { f32 :: NAN } else if ( x == 0. ) && ( y == 0. ) { y } else if ( cxf == 0. ) && ( x != 0. ) { mulsignf ( 0. , x ) } else { cxf } }
Find the next representable FP value
Find the next representable FP value
x
f32
y
f32
x
f32
y
f32