diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2004-12-25 23:56:19 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2004-12-25 23:56:19 +0000 |
commit | 9a3412eea8a2aa2daafa031f2e94f7049c1de202 (patch) | |
tree | 1552eee2b8273a45c572c248f5fdd6ef93185850 /winsup/mingw/include | |
parent | c98b30eadcd911512c4d48f8c529c499724a0161 (diff) | |
download | cygnal-9a3412eea8a2aa2daafa031f2e94f7049c1de202.tar.gz cygnal-9a3412eea8a2aa2daafa031f2e94f7049c1de202.tar.bz2 cygnal-9a3412eea8a2aa2daafa031f2e94f7049c1de202.zip |
* mingwex/complex/(cabsf.c cacosf.c cacoshf.c cargf.c casinf.c
casinhf.c catanf.c catanhf.c ccosf.c ccoshf.c cexpf.c cimagf.c
clogf.c cpowf.c cprojf.c crealf.c csinf.c csinhf.c csqrtf.c
ctanf.c ctanhf.c): New files.
* mingwex/Makefile.in (COMPLEX_DISTFILES): Adjust.
(COMPLEX_OBJS(: Adjust.
* include/complex.h (cabsf, cacosf, cacoshf, cargf, casinf.
casinhf, catanf, catanhf, ccosf, ccoshf, cexpf, cimagf, clogf,
cpowf, cprojf, crealf, csinf, csinhf, csqrtf, ctanf, ctanhf):
Declare.
Diffstat (limited to 'winsup/mingw/include')
-rw-r--r-- | winsup/mingw/include/complex.h | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/winsup/mingw/include/complex.h b/winsup/mingw/include/complex.h index 90e7903bd..3ab2c9e3a 100644 --- a/winsup/mingw/include/complex.h +++ b/winsup/mingw/include/complex.h @@ -46,7 +46,7 @@ extern "C" { #ifndef RC_INVOKED -/* TODO: float and long double versions */ +/* TODO: long double versions */ double __MINGW_ATTRIB_CONST creal (double _Complex); double __MINGW_ATTRIB_CONST cimag (double _Complex); double __MINGW_ATTRIB_CONST carg (double _Complex); @@ -70,6 +70,29 @@ double _Complex cpow (double _Complex, double _Complex); double _Complex csqrt (double _Complex); double _Complex __MINGW_ATTRIB_CONST cproj (double _Complex); +float __MINGW_ATTRIB_CONST crealf (float _Complex); +float __MINGW_ATTRIB_CONST cimagf (float _Complex); +float __MINGW_ATTRIB_CONST cargf (float _Complex); +float __MINGW_ATTRIB_CONST cabsf (float _Complex); +float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex); +float _Complex cacosf (float _Complex); +float _Complex casinf (float _Complex); +float _Complex catanf (float _Complex); +float _Complex ccosf (float _Complex); +float _Complex csinf (float _Complex); +float _Complex ctanf (float _Complex); +float _Complex cacoshf (float _Complex); +float _Complex casinhf (float _Complex); +float _Complex catanhf (float _Complex); +float _Complex ccoshf (float _Complex); +float _Complex csinhf (float _Complex); +float _Complex ctanhf (float _Complex); +float _Complex cexpf (float _Complex); +float _Complex clogf (float _Complex); +float _Complex cpowf (float _Complex, float _Complex); +float _Complex csqrtf (float _Complex); +float _Complex __MINGW_ATTRIB_CONST cprojf (float _Complex); + #ifdef __GNUC__ __CRT_INLINE double __MINGW_ATTRIB_CONST creal (double _Complex _Z) @@ -94,6 +117,30 @@ __CRT_INLINE double __MINGW_ATTRIB_CONST carg (double _Complex _Z) : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)"); return res; } + + +__CRT_INLINE float __MINGW_ATTRIB_CONST crealf (float _Complex _Z) +{ + return __real__ _Z; +} + +__CRT_INLINE float __MINGW_ATTRIB_CONST cimagf (float _Complex _Z) +{ + return __imag__ _Z; +} + +__CRT_INLINE float _Complex __MINGW_ATTRIB_CONST conjf (float _Complex _Z) +{ + return __extension__ ~_Z; +} + +__CRT_INLINE float __MINGW_ATTRIB_CONST cargf (float _Complex _Z) +{ + float res; + __asm__ ("fpatan;" + : "=t" (res) : "0" (__real__ _Z), "u" (__imag__ _Z) : "st(1)"); + return res; +} #endif /* __GNUC__ */ |