diff options
author | das <das@FreeBSD.org> | 2008-08-07 14:39:56 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2008-08-07 14:39:56 +0000 |
commit | 1a05561e3440bd40c2aeaeb7b9369c3e0f3b5852 (patch) | |
tree | d63035ed872a363bf437b7f32c5b4dc4d50b47d4 /include/complex.h | |
parent | f9ebb230ca1b1ab7963cd38728716b73299417dc (diff) | |
download | FreeBSD-src-1a05561e3440bd40c2aeaeb7b9369c3e0f3b5852.zip FreeBSD-src-1a05561e3440bd40c2aeaeb7b9369c3e0f3b5852.tar.gz |
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.
Diffstat (limited to 'include/complex.h')
0 files changed, 0 insertions, 0 deletions