ReactOS  0.4.14-dev-52-g6116262
complex_trig.cpp File Reference
#include "stlport_prefix.h"
#include <complex>
#include <cfloat>
#include <cmath>
Include dependency graph for complex_trig.cpp:

Go to the source code of this file.

Functions

template<class _Tp >
static complex< _Tp > sinT (const complex< _Tp > &z)
 
_STLP_DECLSPEC complex< float > _STLP_CALL sin (const complex< float > &z)
 
_STLP_DECLSPEC complex< double > _STLP_CALL sin (const complex< double > &z)
 
_STLP_DECLSPEC complex< long double > _STLP_CALL sin (const complex< long double > &z)
 
template<class _Tp >
static complex< _Tp > cosT (const complex< _Tp > &z)
 
_STLP_DECLSPEC complex< float > _STLP_CALL cos (const complex< float > &z)
 
_STLP_DECLSPEC complex< double > _STLP_CALL cos (const complex< double > &z)
 
_STLP_DECLSPEC complex< long double > _STLP_CALL cos (const complex< long double > &z)
 
template<class _Tp >
static complex< _Tp > tanT (const complex< _Tp > &z, const _Tp &Tp_limit)
 
_STLP_DECLSPEC complex< float > _STLP_CALL tan (const complex< float > &z)
 
_STLP_DECLSPEC complex< double > _STLP_CALL tan (const complex< double > &z)
 
_STLP_DECLSPEC complex< long double > _STLP_CALL tan (const complex< long double > &z)
 
template<class _Tp >
static complex< _Tp > sinhT (const complex< _Tp > &z)
 
_STLP_DECLSPEC complex< float > _STLP_CALL sinh (const complex< float > &z)
 
_STLP_DECLSPEC complex< double > _STLP_CALL sinh (const complex< double > &z)
 
_STLP_DECLSPEC complex< long double > _STLP_CALL sinh (const complex< long double > &z)
 
template<class _Tp >
static complex< _Tp > coshT (const complex< _Tp > &z)
 
_STLP_DECLSPEC complex< float > _STLP_CALL cosh (const complex< float > &z)
 
_STLP_DECLSPEC complex< double > _STLP_CALL cosh (const complex< double > &z)
 
_STLP_DECLSPEC complex< long double > _STLP_CALL cosh (const complex< long double > &z)
 
template<class _Tp >
static complex< _Tp > tanhT (const complex< _Tp > &z, const _Tp &Tp_limit)
 
_STLP_DECLSPEC complex< float > _STLP_CALL tanh (const complex< float > &z)
 
_STLP_DECLSPEC complex< double > _STLP_CALL tanh (const complex< double > &z)
 
_STLP_DECLSPEC complex< long double > _STLP_CALL tanh (const complex< long double > &z)
 

Variables

static _STLP_BEGIN_NAMESPACE const float float_limit = ::log(FLT_MAX)
 
static const double double_limit = ::log(DBL_MAX)
 
static const long double ldouble_limit = ::log(LDBL_MAX)
 

Function Documentation

◆ cos() [1/3]

◆ cos() [2/3]

Definition at line 95 of file complex_trig.cpp.

96 { return cosT(z); }
static complex< _Tp > cosT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

◆ cos() [3/3]

Definition at line 99 of file complex_trig.cpp.

100 { return cosT(z); }
static complex< _Tp > cosT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

◆ cosh() [1/3]

_STLP_DECLSPEC complex<float> _STLP_CALL cosh ( const complex< float > &  z)

Definition at line 156 of file complex_trig.cpp.

157 { return coshT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > coshT(const complex< _Tp > &z)

Referenced by _CIcosh(), coshf(), coshT(), cosT(), CMathTest::import_checks(), rpn_cosh(), sinhT(), sinT(), tanhT(), tanT(), and ValarrayTest::transcendentals().

◆ cosh() [2/3]

Definition at line 159 of file complex_trig.cpp.

160 { return coshT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > coshT(const complex< _Tp > &z)

◆ cosh() [3/3]

Definition at line 163 of file complex_trig.cpp.

164 { return coshT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > coshT(const complex< _Tp > &z)

◆ coshT()

template<class _Tp >
static complex<_Tp> coshT ( const complex< _Tp > &  z)
static

Definition at line 151 of file complex_trig.cpp.

151  {
152  return complex<_Tp>(::cosh(z._M_re) * ::cos(z._M_im),
153  ::sinh(z._M_re) * ::sin(z._M_im));
154 }
_STLP_DECLSPEC complex< float > _STLP_CALL sinh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cosh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &z)
GLdouble GLdouble z
Definition: glext.h:5874
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &z)

Referenced by cosh().

◆ cosT()

template<class _Tp >
static complex<_Tp> cosT ( const complex< _Tp > &  z)
static

Definition at line 87 of file complex_trig.cpp.

87  {
88  return complex<_Tp>(::cos(z._M_re) * ::cosh(z._M_im),
89  -::sin(z._M_re) * ::sinh(z._M_im));
90 }
_STLP_DECLSPEC complex< float > _STLP_CALL sinh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cosh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &z)
GLdouble GLdouble z
Definition: glext.h:5874
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &z)

Referenced by cos().

◆ sin() [1/3]

◆ sin() [2/3]

Definition at line 76 of file complex_trig.cpp.

77 { return sinT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > sinT(const complex< _Tp > &z)

◆ sin() [3/3]

Definition at line 80 of file complex_trig.cpp.

81 { return sinT(z); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > sinT(const complex< _Tp > &z)

◆ sinh() [1/3]

_STLP_DECLSPEC complex<float> _STLP_CALL sinh ( const complex< float > &  z)

Definition at line 137 of file complex_trig.cpp.

138 { return sinhT(z); }
static complex< _Tp > sinhT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

Referenced by _CIsinh(), coshT(), cosT(), CMathTest::import_checks(), rpn_sinh(), sinhf(), sinhT(), sinT(), tanhT(), tanT(), and ValarrayTest::transcendentals().

◆ sinh() [2/3]

Definition at line 140 of file complex_trig.cpp.

141 { return sinhT(z); }
static complex< _Tp > sinhT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

◆ sinh() [3/3]

Definition at line 144 of file complex_trig.cpp.

145 { return sinhT(z); }
static complex< _Tp > sinhT(const complex< _Tp > &z)
GLdouble GLdouble z
Definition: glext.h:5874

◆ sinhT()

template<class _Tp >
static complex<_Tp> sinhT ( const complex< _Tp > &  z)
static

Definition at line 132 of file complex_trig.cpp.

132  {
133  return complex<_Tp>(::sinh(z._M_re) * ::cos(z._M_im),
134  ::cosh(z._M_re) * ::sin(z._M_im));
135 }
_STLP_DECLSPEC complex< float > _STLP_CALL sinh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cosh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &z)
GLdouble GLdouble z
Definition: glext.h:5874
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &z)

Referenced by sinh().

◆ sinT()

template<class _Tp >
static complex<_Tp> sinT ( const complex< _Tp > &  z)
static

Definition at line 68 of file complex_trig.cpp.

68  {
69  return complex<_Tp>(::sin(z._M_re) * ::cosh(z._M_im),
70  ::cos(z._M_re) * ::sinh(z._M_im));
71 }
_STLP_DECLSPEC complex< float > _STLP_CALL sinh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cosh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &z)
GLdouble GLdouble z
Definition: glext.h:5874
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &z)

Referenced by sin().

◆ tan() [1/3]

_STLP_DECLSPEC complex<float> _STLP_CALL tan ( const complex< float > &  z)

Definition at line 118 of file complex_trig.cpp.

119 { return tanT(z, float_limit); }
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > tanT(const complex< _Tp > &z, const _Tp &Tp_limit)
static _STLP_BEGIN_NAMESPACE const float float_limit

Referenced by _CItan(), app_boundary_point(), GdipCreateLineBrushFromRectWithAngle(), Global_Tan(), CMathTest::import_checks(), init_layer3(), Math_tan(), rpn_tan(), tanf(), test_tan(), and ValarrayTest::transcendentals().

◆ tan() [2/3]

Definition at line 121 of file complex_trig.cpp.

122 { return tanT(z, double_limit); }
GLdouble GLdouble z
Definition: glext.h:5874
static const double double_limit
static complex< _Tp > tanT(const complex< _Tp > &z, const _Tp &Tp_limit)

◆ tan() [3/3]

Definition at line 125 of file complex_trig.cpp.

126 { return tanT(z, ldouble_limit); }
static const long double ldouble_limit
GLdouble GLdouble z
Definition: glext.h:5874
static complex< _Tp > tanT(const complex< _Tp > &z, const _Tp &Tp_limit)

◆ tanh() [1/3]

_STLP_DECLSPEC complex<float> _STLP_CALL tanh ( const complex< float > &  z)

Definition at line 181 of file complex_trig.cpp.

182 { return tanhT(z, float_limit); }
static complex< _Tp > tanhT(const complex< _Tp > &z, const _Tp &Tp_limit)
GLdouble GLdouble z
Definition: glext.h:5874
static _STLP_BEGIN_NAMESPACE const float float_limit

Referenced by _CItanh(), CMathTest::import_checks(), rpn_tanh(), tanhf(), and ValarrayTest::transcendentals().

◆ tanh() [2/3]

Definition at line 184 of file complex_trig.cpp.

185 { return tanhT(z, double_limit); }
static complex< _Tp > tanhT(const complex< _Tp > &z, const _Tp &Tp_limit)
GLdouble GLdouble z
Definition: glext.h:5874
static const double double_limit

◆ tanh() [3/3]

Definition at line 188 of file complex_trig.cpp.

189 { return tanhT(z, ldouble_limit); }
static const long double ldouble_limit
static complex< _Tp > tanhT(const complex< _Tp > &z, const _Tp &Tp_limit)
GLdouble GLdouble z
Definition: glext.h:5874

◆ tanhT()

template<class _Tp >
static complex<_Tp> tanhT ( const complex< _Tp > &  z,
const _Tp &  Tp_limit 
)
static

Definition at line 170 of file complex_trig.cpp.

170  {
171  _Tp re2 = 2.f * z._M_re;
172  _Tp im2 = 2.f * z._M_im;
173  if (::abs(re2) > Tp_limit)
174  return complex<_Tp>((re2 > 0 ? 1.f : -1.f), 0.f);
175  else {
176  _Tp den = ::cosh(re2) + ::cos(im2);
177  return complex<_Tp>(::sinh(re2) / den, ::sin(im2) / den);
178  }
179 }
#define abs(i)
Definition: fconv.c:206
_STLP_DECLSPEC complex< float > _STLP_CALL sinh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cosh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &z)
GLdouble GLdouble z
Definition: glext.h:5874
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &z)
GLfloat f
Definition: glext.h:7540

Referenced by tanh().

◆ tanT()

template<class _Tp >
static complex<_Tp> tanT ( const complex< _Tp > &  z,
const _Tp &  Tp_limit 
)
static

Definition at line 106 of file complex_trig.cpp.

106  {
107  _Tp re2 = 2.f * z._M_re;
108  _Tp im2 = 2.f * z._M_im;
109 
110  if (::abs(im2) > Tp_limit)
111  return complex<_Tp>(0.f, (im2 > 0 ? 1.f : -1.f));
112  else {
113  _Tp den = ::cos(re2) + ::cosh(im2);
114  return complex<_Tp>(::sin(re2) / den, ::sinh(im2) / den);
115  }
116 }
#define abs(i)
Definition: fconv.c:206
_STLP_DECLSPEC complex< float > _STLP_CALL sinh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cosh(const complex< float > &z)
_STLP_DECLSPEC complex< float > _STLP_CALL cos(const complex< float > &z)
GLdouble GLdouble z
Definition: glext.h:5874
_STLP_DECLSPEC complex< float > _STLP_CALL sin(const complex< float > &z)
GLfloat f
Definition: glext.h:7540

Referenced by tan().

Variable Documentation

◆ double_limit

const double double_limit = ::log(DBL_MAX)
static

Definition at line 53 of file complex_trig.cpp.

Referenced by tan(), and tanh().

◆ float_limit

_STLP_BEGIN_NAMESPACE const float float_limit = ::log(FLT_MAX)
static

Definition at line 52 of file complex_trig.cpp.

Referenced by tan(), and tanh().

◆ ldouble_limit

const long double ldouble_limit = ::log(LDBL_MAX)
static

Definition at line 59 of file complex_trig.cpp.

Referenced by tan(), and tanh().