25#if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB >= 1400)
27# if defined (_STLP_MSVC)
28# pragma warning (disable : 4996)
30# pragma warning (disable : 1478)
46#if !defined (_STLP_NO_LONG_DOUBLE)
62#if !defined (_STLP_NO_LONG_DOUBLE)
76#if !defined (_STLP_NO_LONG_DOUBLE)
84static void _divT(
const _Tp& __z1_r,
const _Tp& __z1_i,
85 const _Tp& __z2_r,
const _Tp& __z2_i,
86 _Tp& __res_r, _Tp& __res_i) {
87 _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r;
88 _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i;
91 _Tp __ratio = __z2_r / __z2_i;
92 _Tp __denom = __z2_i * (1 + __ratio * __ratio);
93 __res_r = (__z1_r * __ratio + __z1_i) / __denom;
94 __res_i = (__z1_i * __ratio - __z1_r) / __denom;
97 _Tp __ratio = __z2_i / __z2_r;
98 _Tp __denom = __z2_r * (1 + __ratio * __ratio);
99 __res_r = (__z1_r + __z1_i * __ratio) / __denom;
100 __res_i = (__z1_i - __z1_r * __ratio) / __denom;
106 const _Tp& __z2_r,
const _Tp& __z2_i,
107 _Tp& __res_r, _Tp& __res_i) {
108 _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r;
109 _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i;
112 _Tp __ratio = __z2_r / __z2_i;
113 _Tp __denom = __z2_i * (1 + __ratio * __ratio);
114 __res_r = (__z1_r * __ratio) / __denom;
115 __res_i = - __z1_r / __denom;
118 _Tp __ratio = __z2_i / __z2_r;
119 _Tp __denom = __z2_r * (1 + __ratio * __ratio);
120 __res_r = __z1_r / __denom;
121 __res_i = - (__z1_r * __ratio) / __denom;
127 const float& __z2_r,
const float& __z2_i,
128 float& __res_r,
float& __res_i)
129{
_divT(__z1_r, __z1_i, __z2_r, __z2_i, __res_r, __res_i); }
133 const float& __z2_r,
const float& __z2_i,
134 float& __res_r,
float& __res_i)
135{
_divT(__z1_r, __z2_r, __z2_i, __res_r, __res_i); }
140 const double& __z2_r,
const double& __z2_i,
141 double& __res_r,
double& __res_i)
142{
_divT(__z1_r, __z1_i, __z2_r, __z2_i, __res_r, __res_i); }
146 const double& __z2_r,
const double& __z2_i,
147 double& __res_r,
double& __res_i)
148{
_divT(__z1_r, __z2_r, __z2_i, __res_r, __res_i); }
150#if !defined (_STLP_NO_LONG_DOUBLE)
153 const long double& __z2_r,
const long double& __z2_i,
154 long double& __res_r,
long double& __res_i)
155{
_divT(__z1_r, __z1_i, __z2_r, __z2_i, __res_r, __res_i); }
159 const long double& __z2_r,
const long double& __z2_i,
160 long double& __res_r,
long double& __res_i)
161{
_divT(__z1_r, __z2_r, __z2_i, __res_r, __res_i); }
175 }
else if (re > 0.f) {
193#if !defined (_STLP_NO_LONG_DOUBLE)
203 _Tp expx =
::exp(
z._M_re);
213#if !defined (_STLP_NO_LONG_DOUBLE)
224 r._M_im =
::atan2(
z._M_im,
z._M_re) * ln10_inv;
237#if !defined (_STLP_NO_LONG_DOUBLE)
259#ifndef _STLP_NO_LONG_DOUBLE
270 _Tp
y = logr *
b._M_im;
299 _Tp
x =
::exp(logr *
b._M_re - logi *
b._M_im);
300 _Tp
y = logr *
b._M_im + logi *
b._M_re;
309{
return powT(z_in,
n); }
321{
return powT(z_in,
n); }
329#if !defined (_STLP_NO_LONG_DOUBLE)
336{
return powT(z_in,
n); }
339 const long double&
b)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &)
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &)
_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr)
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
static const long double LN10_INVL
static complex< _Tp > sqrtT(const complex< _Tp > &z)
static const double LN10_INV
complex< float > _STLP_CALL sqrt(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL log10(const complex< float > &z)
static complex< _Tp > logT(const complex< _Tp > &z)
_STLP_TEMPLATE_NULL _STLP_DECLSPEC complex< float > _STLP_CALL polar(const float &__rho, const float &__phi)
static complex< _Tp > log10T(const complex< _Tp > &z, const _Tp &ln10_inv)
static complex< _Tp > powT(const _Tp &a, const complex< _Tp > &b)
static complex< _Tp > expT(const complex< _Tp > &z)
static const float LN10_INVF
_STLP_DECLSPEC complex< float > _STLP_CALL pow(const float &a, const complex< float > &b)
static void _divT(const _Tp &__z1_r, const _Tp &__z1_i, const _Tp &__z2_r, const _Tp &__z2_i, _Tp &__res_r, _Tp &__res_i)
#define _STLP_TEMPLATE_NULL
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
_Check_return_ __CRT_INLINE double hypot(_In_ double x, _In_ double y)
static void _STLP_CALL _div(const value_type &__z1_r, const value_type &__z1_i, const value_type &__z2_r, const value_type &__z2_i, value_type &__res_r, value_type &__res_i)