summaryrefslogtreecommitdiffstats
path: root/include/complex.h
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2008-08-07 14:39:56 +0000
committerdas <das@FreeBSD.org>2008-08-07 14:39:56 +0000
commit1a05561e3440bd40c2aeaeb7b9369c3e0f3b5852 (patch)
treed63035ed872a363bf437b7f32c5b4dc4d50b47d4 /include/complex.h
parentf9ebb230ca1b1ab7963cd38728716b73299417dc (diff)
downloadFreeBSD-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
OpenPOWER on IntegriCloud