cvs commit: src/lib/msun/src s_cimag.c s_cimagf.c s_cimagl.c
s_conj.c s_conjf.c s_conjl.c
David Schultz
das at FreeBSD.org
Thu Aug 7 14:40:01 UTC 2008
das 2008-08-07 14:39:56 UTC
FreeBSD src repository
Modified files:
lib/msun/src s_cimag.c s_cimagf.c s_cimagl.c s_conj.c
s_conjf.c s_conjl.c
Log:
SVN rev 181374 on 2008-08-07 14:39:56Z by das
Use cpack() and the gcc extension __imag__ to implement cimag() and
conj() instead of using expressions like z * I. The latter is bad for
several reasons:
1. It is implemented using arithmetic, which is unnecessary, and can
generate floating point exceptions, contrary to the requirements on
these functions.
2. gcc implements complex multiplication using a formula that breaks
down for infinities, e.g., it gives INFINITY * I == nan + inf I.
Revision Changes Path
1.2 +2 -1 src/lib/msun/src/s_cimag.c
1.2 +2 -1 src/lib/msun/src/s_cimagf.c
1.2 +2 -1 src/lib/msun/src/s_cimagl.c
1.2 +4 -1 src/lib/msun/src/s_conj.c
1.2 +4 -1 src/lib/msun/src/s_conjf.c
1.2 +4 -1 src/lib/msun/src/s_conjl.c
More information about the cvs-all
mailing list