Changeset 3836
- Timestamp:
- Mar 16, 2014, 6:39:23 PM (11 years ago)
- Location:
- trunk/libc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libc/include/complex.h
r3832 r3836 48 48 typedef struct __long_double_complex { long double __m_Real, __m_Imag; } __long_double_complex; 49 49 #else 50 # define __float_complex __float_complex51 # define __double_complex __double_complex52 # define __long_double_complex __long_double_complex50 # define __float_complex float complex 51 # define __double_complex double complex 52 # define __long_double_complex long double complex 53 53 54 54 # define complex _Complex -
trunk/libc/include/sys/cdefs.h
r3835 r3836 174 174 # define __KLIBC_COMPLEX_IMAG(a_uValue) ( (a_uValue).__m_Imag ) 175 175 #else 176 # define __KLIBC_COMPLEX_REAL(a_uValue) real(a_uValue)177 # define __KLIBC_COMPLEX_IMAG(a_uValue) imag(a_uValue)176 # define __KLIBC_COMPLEX_REAL(a_uValue) __real__ (a_uValue) 177 # define __KLIBC_COMPLEX_IMAG(a_uValue) __imag__ (a_uValue) 178 178 #endif 179 179 -
trunk/libc/src/libc/math/carg.c
r3830 r3836 11 11 #include <math.h> 12 12 13 long double _STD(carg)(__double_complex lird)13 double _STD(carg)(__double_complex ird) 14 14 { 15 double lrdReal = __KLIBC_COMPLEX_REAL(lird);16 double lrdImag = __KLIBC_COMPLEX_IMAG(lird);17 return atan2( lrdReal, lrdImag);15 double rdReal = __KLIBC_COMPLEX_REAL(ird); 16 double rdImag = __KLIBC_COMPLEX_IMAG(ird); 17 return atan2(rdReal, rdImag); 18 18 } 19 19
Note:
See TracChangeset
for help on using the changeset viewer.