Esempio n. 1
0
  static const union { unsigned int i; float f; } float_ulimit = { 0x42b2d4fc };
  static const float float_limit = float_ulimit.f;
  static union {
    struct { unsigned int h; unsigned int l; } w;
    double d;
  } double_ulimit = { 0x408633ce, 0x8fb9f87d };
  static const double double_limit = double_ulimit.d;
  static union {
    struct { unsigned int h[2]; unsigned int l[2]; } w;
    long double ld;
  } ldouble_ulimit = {0x408633ce, 0x8fb9f87e, 0xbd23b659, 0x4e9bd8b1};
# ifndef _STLP_NO_LONG_DOUBLE
  static const long double ldouble_limit = ldouble_ulimit.ld;
# endif
#else
  static const float float_limit = _STLP_LOGF(FLT_MAX);
  static const double double_limit = _STLP_DO_LOG(double)(DBL_MAX);
# ifndef _STLP_NO_LONG_DOUBLE
  static const long double ldouble_limit = _STLP_LOGL(LDBL_MAX);
# endif
#endif


//----------------------------------------------------------------------
// sin

_STLP_DECLSPEC complex<float>  _STLP_CALL sin(const complex<float>& z) {
  return complex<float>(_STLP_SINF(z._M_re) * _STLP_COSHF(z._M_im),
                        _STLP_COSF(z._M_re) * _STLP_SINHF(z._M_im));
}
Esempio n. 2
0
void complex_trig_limit_init()
{
	get_complex_trig_float_limit() = _STLP_LOGF(FLT_MAX);
	get_complex_trig_double_limit() = _STLP_DO_LOG(double)(DBL_MAX);    
}