#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
275819 |
|
16-Dec-2014 |
ed |
Rename cpack*() to CMPLX*().
The C11 standard introduced a set of macros (CMPLX, CMPLXF, CMPLXL) that can be used to construct complex numbers from a pair of real and imaginary numbers. Unfortunately, they require some compiler support, which is why we only define them for Clang and GCC>=4.7.
The cpack() function in libm performs the same task as CMPLX(), but cannot be used to generate compile-time constants. This means that all invocations of cpack() can safely be replaced by C11's CMPLX(). To keep the code building with GCC 4.2, provide copies of CMPLX() that can at least be used to generate run-time complex numbers.
This makes it easier to build some of the functions outside of libm.
|
#
181374 |
|
07-Aug-2008 |
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.
|
#
129864 |
|
30-May-2004 |
stefanf |
Add implementations for cimag{,f,l}, creal{,f,l} and conj{,f,l}. They are needed for cases where GCC's builtin functions cannot be used and for compilers that don't know about them.
Approved by: das (mentor)
|