pub fn rintf(d: f32) -> f32 {
    let mut x = d + 0.5;
    let isodd = (1 & (x as i32)) != 0;
    let mut fr = x - (x as i32 as f32);
    fr = if (fr < 0.) || ((fr == 0.) && isodd) {
        fr + 1.
    } else {
        fr
    };
    x = if d == 0.500_000_059_604_644_775_39 {
        0.
    } else {
        x
    }; // nextafterf(0.5, 1)
    if d.is_infinite() || (fabsfk(d) >= F1_23) {
        d
    } else {
        copysignfk(x - fr, d)
    }
}
/// Round to integer, ties round to even
Round to integer, ties round to even
Round to integer ties round to even
pub fn rintf(d: f32) -> f32 {
    let mut x = d + 0.5;
    let isodd = (1 & (x as i32)) != 0;
    let mut fr = x - (x as i32 as f32);
    fr = if (fr < 0.) || ((fr == 0.) && isodd) {
        fr + 1.
    } else {
        fr
    };
    x = if d == 0.500_000_059_604_644_775_39 {
        0.
    } else {
        x
    }; // nextafterf(0.5, 1)
    if d.is_infinite() || (fabsfk(d) >= F1_23) {
        d
    } else {
        copysignfk(x - fr, d)
    }
}
pub fn rintf ( d : f32 ) -> f32 { let mut x = d + 0.5 ; let isodd = ( 1 & ( x as i32 ) ) != 0 ; let mut fr = x - ( x as i32 as f32 ) ; fr = if ( fr < 0. ) || ( ( fr == 0. ) && isodd ) { fr + 1. } else { fr } ; x = if d == 0.500_000_059_604_644_775_39 { 0. } else { x } ; // nextafterf(0.5, 1) if d . is_infinite ( ) || ( fabsfk ( d ) >= F1_23 ) { d } else { copysignfk ( x - fr , d ) } }
Round to integer, ties round to even
Round to integer ties round to even
d
f32
d
f32