math: erf and erfc cleanup math
authorSzabolcs Nagy <nsz@port70.net>
Mon, 7 Jan 2013 22:54:13 +0000 (23:54 +0100)
committerSzabolcs Nagy <nsz@port70.net>
Mon, 7 Jan 2013 22:54:13 +0000 (23:54 +0100)
commit121e3a38a1d0b324696fc1671029e4b815ea7fa4
tree608923bcb097799f051cb509af138d8a49239cc5
parentd84923d89e4fe46877334cbaa5e4549f2c4cb8a6
math: erf and erfc cleanup

common part of erf and erfc was put in a separate function which
saved some space and the new code is using unsigned arithmetics

erfcf had a bug: for some inputs in [7.95,8] the result had
more than 60ulp error: in expf(-z*z - 0.5625f) the argument
must be exact but not enough lowbits of z were zeroed,
-SET_FLOAT_WORD(z, ix&0xfffff000);
+SET_FLOAT_WORD(z, ix&0xffffe000);
fixed the issue
src/math/erf.c
src/math/erff.c
src/math/erfl.c