STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Static Public Member Functions | List of all members
_Ctraits< float > Class Template Reference

Public Types

typedef float _Ty
 

Static Public Member Functions

static _Ty _Flt_eps ()
 
static _Ty _Flt_max ()
 
static _Ty _Cosh (_Ty _Left, _Ty _Right)
 
static short _Exp (_Ty *_Pleft, _Ty _Right, short _Exponent)
 
static _Ty _Infv (_Ty)
 
static bool _Isinf (_Ty _Left)
 
static bool _Isnan (_Ty _Left)
 
static _Ty _Nanv (_Ty)
 
static _Ty _Sinh (_Ty _Left, _Ty _Right)
 
static _Ty asinh (_Ty _Left)
 
static _Ty atan2 (_Ty _Yval, _Ty _Xval)
 
static _Ty cos (_Ty _Left)
 
static _Ty exp (_Ty _Left)
 
static _Ty ldexp (_Ty _Left, int _Exponent)
 
static _Ty log (_Ty _Left)
 
static _Ty log1p (_Ty _Left)
 
static _Ty pow (_Ty _Left, _Ty _Right)
 
static _Ty sin (_Ty _Left)
 
static _Ty sqrt (_Ty _Left)
 
static _Ty tan (_Ty _Left)
 

Member Typedef Documentation

typedef float _Ctraits< float >::_Ty

Member Function Documentation

static _Ty _Ctraits< float >::_Cosh ( _Ty  _Left,
_Ty  _Right 
)
inlinestatic
470  { // return cosh(_Left) * _Right
471  return (_CSTD _FCosh(_Left, _Right));
472  }
_CRTIMP2_PURE float __CLRCALL_PURE_OR_CDECL _FCosh(float, float)
#define _CSTD
Definition: yvals.h:559
const _Ty & _Right
Definition: algorithm:4087
static short _Ctraits< float >::_Exp ( _Ty _Pleft,
_Ty  _Right,
short  _Exponent 
)
inlinestatic
475  { // compute exp(*_Pleft) * _Right * 2 ^ _Exponent
476  return (_CSTD _FExp(_Pleft, _Right, _Exponent));
477  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _FExp(float *, float, short)
#define _CSTD
Definition: yvals.h:559
const _Ty & _Right
Definition: algorithm:4087
static _Ty _Ctraits< float >::_Flt_eps ( )
inlinestatic
460  { // get epsilon
461  return (FLT_EPSILON);
462  }
#define FLT_EPSILON
Definition: float.h:86
static _Ty _Ctraits< float >::_Flt_max ( )
inlinestatic
465  { // get max
466  return (FLT_MAX);
467  }
#define FLT_MAX
Definition: float.h:89
static _Ty _Ctraits< float >::_Infv ( _Ty  )
inlinestatic
480  { // return infinity
481  return (_CSTD _FInf._Float);
482  }
_CRTIMP2_PURE _Dconst _FInf
#define _CSTD
Definition: yvals.h:559
float _Float
Definition: ymath.h:38
static bool _Ctraits< float >::_Isinf ( _Ty  _Left)
inlinestatic
485  { // test for infinity
486  return (_CSTD _FDtest(&_Left) == _INFCODE);
487  }
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _FDtest(float *)
#define _CSTD
Definition: yvals.h:559
#define _INFCODE
Definition: math.h:110
static bool _Ctraits< float >::_Isnan ( _Ty  _Left)
inlinestatic
490  { // test for NaN
491  return (_CSTD _FDtest(&_Left) == _NANCODE);
492  }
#define _NANCODE
Definition: math.h:111
_CRTIMP2_PURE short __CLRCALL_PURE_OR_CDECL _FDtest(float *)
#define _CSTD
Definition: yvals.h:559
static _Ty _Ctraits< float >::_Nanv ( _Ty  )
inlinestatic
495  { // return NaN
496  return (_CSTD _FNan._Float);
497  }
#define _CSTD
Definition: yvals.h:559
_CRTIMP2_PURE _Dconst _FNan
float _Float
Definition: ymath.h:38
static _Ty _Ctraits< float >::_Sinh ( _Ty  _Left,
_Ty  _Right 
)
inlinestatic
500  { // return sinh(_Left) * _Right
501  return (_CSTD _FSinh(_Left, _Right));
502  }
_CRTIMP2_PURE float __CLRCALL_PURE_OR_CDECL _FSinh(float, float)
#define _CSTD
Definition: yvals.h:559
const _Ty & _Right
Definition: algorithm:4087
static _Ty _Ctraits< float >::asinh ( _Ty  _Left)
inlinestatic
505  { // return asinh(_Left)
506  static const _Ty _Ln2 = 0.69314718055994530941723212145817658F;
507 
508  bool _Neg = _Left < 0;
509  _Ty _Ans;
510 
511  if (_Neg)
512  _Left = -_Left;
513  if (_Left < 2 / _Flt_eps())
514  _Ans = log1p(_Left
515  + _Left * _Left / (1 + sqrt(_Left * _Left + 1)));
516  else
517  _Ans = log(_Left) + _Ln2;
518  return (_Neg ? -_Ans : _Ans);
519  }
float _Ty
Definition: complex:457
static _Ty log1p(_Ty _Left)
Definition: complex:546
static _Ty _Flt_eps()
Definition: complex:459
static _Ty sqrt(_Ty _Left)
Definition: complex:569
static _Ty log(_Ty _Left)
Definition: complex:541
static _Ty _Ctraits< float >::atan2 ( _Ty  _Yval,
_Ty  _Xval 
)
inlinestatic
522  { // return atan(_Yval / _Xval)
523  return (_CSTD atan2f(_Yval, _Xval));
524  }
__inline float __CRTDECL atan2f(_In_ float _Y, _In_ float _X)
Definition: math.h:647
#define _CSTD
Definition: yvals.h:559
static _Ty _Ctraits< float >::cos ( _Ty  _Left)
inlinestatic
527  { // return cos(_Left)
528  return (_CSTD cosf(_Left));
529  }
__inline float __CRTDECL cosf(_In_ float _X)
Definition: math.h:662
#define _CSTD
Definition: yvals.h:559
static _Ty _Ctraits< float >::exp ( _Ty  _Left)
inlinestatic
532  { // return exp(_Left)
533  return (_CSTD expf(_Left));
534  }
#define _CSTD
Definition: yvals.h:559
__inline float __CRTDECL expf(_In_ float _X)
Definition: math.h:672
static _Ty _Ctraits< float >::ldexp ( _Ty  _Left,
int  _Exponent 
)
inlinestatic
537  { // return _Left * 2 ^ _Exponent
538  return (_CSTD ldexpf(_Left, _Exponent));
539  }
#define _CSTD
Definition: yvals.h:559
__inline float __CRTDECL ldexpf(_In_ float _X, _In_ int _Y)
Definition: math.h:721
static _Ty _Ctraits< float >::log ( _Ty  _Left)
inlinestatic
542  { // return log(_Left)
543  return (_CSTD logf(_Left));
544  }
__inline float __CRTDECL logf(_In_ float _X)
Definition: math.h:745
#define _CSTD
Definition: yvals.h:559
static _Ty _Ctraits< float >::log1p ( _Ty  _Left)
inlinestatic
547  { // return log(1 + _Left)
548  if (_Left < -1)
549  return (_Nanv(_Left));
550  else if (_Left == 0)
551  return (_Left);
552  else
553  { // compute log(1 + _Left) with fixup for small _Left
554  _Ty _Leftp1 = 1 + _Left;
555  return (log(_Leftp1) - ((_Leftp1 - 1) - _Left) / _Leftp1);
556  }
557  }
float _Ty
Definition: complex:457
static _Ty log(_Ty _Left)
Definition: complex:541
static _Ty _Nanv(_Ty)
Definition: complex:494
static _Ty _Ctraits< float >::pow ( _Ty  _Left,
_Ty  _Right 
)
inlinestatic
560  { // return _Left ^ _Right
561  return (_CSTD powf(_Left, _Right));
562  }
__inline float __CRTDECL powf(_In_ float _X, _In_ float _Y)
Definition: math.h:758
#define _CSTD
Definition: yvals.h:559
const _Ty & _Right
Definition: algorithm:4087
static _Ty _Ctraits< float >::sin ( _Ty  _Left)
inlinestatic
565  { // return sin(_Left)
566  return (_CSTD sinf(_Left));
567  }
__inline float __CRTDECL sinf(_In_ float _X)
Definition: math.h:763
#define _CSTD
Definition: yvals.h:559
static _Ty _Ctraits< float >::sqrt ( _Ty  _Left)
inlinestatic
570  { // return sqrt(_Left)
571  return (_CSTD sqrtf(_Left));
572  }
__inline float __CRTDECL sqrtf(_In_ float _X)
Definition: math.h:773
#define _CSTD
Definition: yvals.h:559
static _Ty _Ctraits< float >::tan ( _Ty  _Left)
inlinestatic
575  { // return tan(_Left)
576  return (_CSTD tanf(_Left));
577  }
__inline float __CRTDECL tanf(_In_ float _X)
Definition: math.h:778
#define _CSTD
Definition: yvals.h:559

The documentation for this class was generated from the following file: