pub fn erff(mut a: f32) -> f32 {
    let s = a;

    a = fabsfk(a);
    let o0 = a < 1.1;
    let o1 = a < 2.4;
    let o2 = a < 4.0;
    let mut u = if o0 { a * a } else { a };

    let t = if o0 {
        0.708_929_219_4_e-4_f32
    } else if o1 {
        -0.179_266_789_9_e-4
    } else {
        -0.949_575_769_5_e-5
    }
    .mul_add(
        u,
        if o0 {
            -0.776_831_118_9_e-3
        } else if o1 {
            0.393_763_301_e-3
        } else {
            0.248_146_592_6_e-3
        },
    )
    .mul_add(
        u,
        if o0 {
            0.515_946_373_3_e-2
        } else if o1 {
            -0.394_918_117_7_e-2
        } else {
            -0.291_817_681_9_e-2
        },
    )
    .mul_add(
        u,
        if o0 {
            -0.268_378_127_4_e-1
        } else if o1 {
            0.244_547_464_e-1
        } else {
            0.205_970_667_3_e-1
        },
    )
    .mul_add(
        u,
        if o0 {
            0.112_831_801_2
        } else if o1 {
            -0.107_099_615_0
        } else {
            -0.990_189_984_4_e-1
        },
    );
    let mut d = t.mul_as_doubled(u);
    d += if o0 {
        df(-0.376_125_876_000_657_465_175_213_237_214, 0.)
    } else if o1 {
        df(-0.634_588_905_908_410_389_971_210_809_210, 0.)
    } else {
        df(-0.643_598_050_547_891_613_081_201_721_633, 0.)
    };
    d *= u;
    d += if o0 {
        df(0.112_837_916_021_059_138_255_978_217_023_e+1, 0.)
    } else if o1 {
        df(-0.112_879_855_826_694_507_209_862_753_992_e+1, 0.)
    } else {
        df(-0.112_461_487_742_845_562_801_052_956_293_e+1, 0.)
    };
    d *= a;
    d = if o0 { d } else { (1.).add_checked(-expk2f(d)) };
    u = mulsignf(if o2 { d.0 + d.1 } else { 1. }, s);
    if a.is_nan() {
        f32::NAN
    } else {
        u
    }
}
/// Error function
///
/// The error bound of the returned value is 1.0 ULP.
Error function
The error bound of the returned value is 1.0 ULP.
Error function The error bound of the returned value is 1 . 0 ULP .
pub fn erff(mut a: f32) -> f32 {
    let s = a;
    a = fabsfk(a);
    let o0 = a < 1.1;
    let o1 = a < 2.4;
    let o2 = a < 4.0;
    let mut u = if o0 { a * a } else { a };
    let t = if o0 {
        0.708_929_219_4_e-4_f32
    } else if o1 {
        -0.179_266_789_9_e-4
    } else {
        -0.949_575_769_5_e-5
    }
    .mul_add(
        u,
        if o0 {
            -0.776_831_118_9_e-3
        } else if o1 {
            0.393_763_301_e-3
        } else {
            0.248_146_592_6_e-3
        },
    )
    .mul_add(
        u,
        if o0 {
            0.515_946_373_3_e-2
        } else if o1 {
            -0.394_918_117_7_e-2
        } else {
            -0.291_817_681_9_e-2
        },
    )
    .mul_add(
        u,
        if o0 {
            -0.268_378_127_4_e-1
        } else if o1 {
            0.244_547_464_e-1
        } else {
            0.205_970_667_3_e-1
        },
    )
    .mul_add(
        u,
        if o0 {
            0.112_831_801_2
        } else if o1 {
            -0.107_099_615_0
        } else {
            -0.990_189_984_4_e-1
        },
    );
    let mut d = t.mul_as_doubled(u);
    d += if o0 {
        df(-0.376_125_876_000_657_465_175_213_237_214, 0.)
    } else if o1 {
        df(-0.634_588_905_908_410_389_971_210_809_210, 0.)
    } else {
        df(-0.643_598_050_547_891_613_081_201_721_633, 0.)
    };
    d *= u;
    d += if o0 {
        df(0.112_837_916_021_059_138_255_978_217_023_e+1, 0.)
    } else if o1 {
        df(-0.112_879_855_826_694_507_209_862_753_992_e+1, 0.)
    } else {
        df(-0.112_461_487_742_845_562_801_052_956_293_e+1, 0.)
    };
    d *= a;
    d = if o0 { d } else { (1.).add_checked(-expk2f(d)) };
    u = mulsignf(if o2 { d.0 + d.1 } else { 1. }, s);
    if a.is_nan() {
        f32::NAN
    } else {
        u
    }
}
pub fn erff ( mut a : f32 ) -> f32 { let s = a ; a = fabsfk ( a ) ; let o0 = a < 1.1 ; let o1 = a < 2.4 ; let o2 = a < 4.0 ; let mut u = if o0 { a * a } else { a } ; let t = if o0 { 0.708_929_219_4_e-4_f32 } else if o1 { - 0.179_266_789_9_e-4 } else { - 0.949_575_769_5_e-5 } . mul_add ( u , if o0 { - 0.776_831_118_9_e-3 } else if o1 { 0.393_763_301_e-3 } else { 0.248_146_592_6_e-3 } , ) . mul_add ( u , if o0 { 0.515_946_373_3_e-2 } else if o1 { - 0.394_918_117_7_e-2 } else { - 0.291_817_681_9_e-2 } , ) . mul_add ( u , if o0 { - 0.268_378_127_4_e-1 } else if o1 { 0.244_547_464_e-1 } else { 0.205_970_667_3_e-1 } , ) . mul_add ( u , if o0 { 0.112_831_801_2 } else if o1 { - 0.107_099_615_0 } else { - 0.990_189_984_4_e-1 } , ) ; let mut d = t . mul_as_doubled ( u ) ; d += if o0 { df ( - 0.376_125_876_000_657_465_175_213_237_214 , 0. ) } else if o1 { df ( - 0.634_588_905_908_410_389_971_210_809_210 , 0. ) } else { df ( - 0.643_598_050_547_891_613_081_201_721_633 , 0. ) } ; d *= u ; d += if o0 { df ( 0.112_837_916_021_059_138_255_978_217_023_e+1 , 0. ) } else if o1 { df ( - 0.112_879_855_826_694_507_209_862_753_992_e+1 , 0. ) } else { df ( - 0.112_461_487_742_845_562_801_052_956_293_e+1 , 0. ) } ; d *= a ; d = if o0 { d } else { ( 1. ) . add_checked ( - expk2f ( d ) ) } ; u = mulsignf ( if o2 { d . 0 + d . 1 } else { 1. } , s ) ; if a . is_nan ( ) { f32 :: NAN } else { u } }
Error function
The error bound of the returned value is 1.0 ULP.
Error function The error bound of the returned value is 1 . 0 ULP .
a
f32
a
f32