epoc32/include/stdapis/stlportv5/stl/_cmath.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/stdapis/stlportv5/stl/_cmath.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/stlportv5/stl/_cmath.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,13 +1,11 @@
     1.4  /*
     1.5 - * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     1.6 - *
     1.7 - * Copyright (c) 1999 
     1.8 + * Copyright (c) 1999
     1.9   * Boris Fomitchev
    1.10   *
    1.11   * This material is provided "as is", with absolutely no warranty expressed
    1.12   * or implied. Any use is at your own risk.
    1.13   *
    1.14 - * Permission to use or copy this software for any purpose is hereby granted 
    1.15 + * Permission to use or copy this software for any purpose is hereby granted
    1.16   * without fee, provided the above notices are retained on all copies.
    1.17   * Permission to modify the code and to distribute modified code is granted,
    1.18   * provided the above notices are retained, and a notice that the code was
    1.19 @@ -15,196 +13,548 @@
    1.20   *
    1.21   */
    1.22  
    1.23 -#ifndef _STLP_CMATH_H_HEADER
    1.24 -# define _STLP_CMATH_H_HEADER
    1.25 +#ifndef _STLP_INTERNAL_CMATH
    1.26 +#define _STLP_INTERNAL_CMATH
    1.27  
    1.28 -# include <cmath>
    1.29 +/* gcc do not like when a using directive appear after a function
    1.30 + * declaration. cmath have abs overloads and cstdlib a using directive
    1.31 + * so cstdlib has to be included first.
    1.32 + */
    1.33 +#if defined (__GNUC__) && defined (_STLP_USE_NEW_C_HEADERS)
    1.34 +#  include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
    1.35 +#endif
    1.36  
    1.37 -_STLP_BEGIN_NAMESPACE
    1.38 +#if defined (_STLP_USE_NEW_C_HEADERS)
    1.39 +#  if defined (_STLP_HAS_NO_NAMESPACES) && !defined (exception)
    1.40 +#    define exception __math_exception
    1.41 +#  endif
    1.42 +#  include _STLP_NATIVE_CPP_C_HEADER(cmath)
    1.43 +#  if defined (_STLP_HAS_NO_NAMESPACES)
    1.44 +#    undef exception
    1.45 +#  endif
    1.46 +#else
    1.47 +#  include <math.h>
    1.48 +#endif
    1.49  
    1.50 -# if defined  (_STLP_SAME_FUNCTION_NAME_RESOLUTION_BUG) && (! defined (_STLP_VXWORKS_TORNADO)) 
    1.51 -
    1.52 -// this proxy is needed for some compilers to resolve problems
    1.53 -// calling sqrt() from within sqrt(), etc.
    1.54 -template <class _Tp>
    1.55 -struct _STL_math_proxy {
    1.56 -  static inline _Tp _do_abs(const _Tp& __x)     { return _STLP_VENDOR_CSTD::fabs(__x); } 
    1.57 -  static inline _Tp _do_acos(const _Tp& __x)    { return _STLP_VENDOR_CSTD::acos(__x); } 
    1.58 -  static inline _Tp _do_asin(const _Tp& __x)    { return _STLP_VENDOR_CSTD::asin(__x); } 
    1.59 -  static inline _Tp _do_atan(const _Tp& __x)    { return _STLP_VENDOR_CSTD::atan(__x); } 
    1.60 -  static inline _Tp _do_atan2(const _Tp& __x, const _Tp& __y)  { return _STLP_VENDOR_CSTD::atan2(__x, __y); } 
    1.61 -  static inline _Tp _do_cos(const _Tp& __x)     { return _STLP_VENDOR_CSTD::cos(__x); } 
    1.62 -  static inline _Tp _do_cosh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::cosh(__x); } 
    1.63 -  static inline _Tp _do_floor(const _Tp& __x)    { return _STLP_VENDOR_CSTD::floor(__x); } 
    1.64 -  static inline _Tp _do_ceil(const _Tp& __x)    { return _STLP_VENDOR_CSTD::ceil(__x); } 
    1.65 -  static inline _Tp _do_fmod(const _Tp& __x, const _Tp& __y)    { return _STLP_VENDOR_CSTD::fmod(__x, __y); } 
    1.66 -  static inline _Tp _do_frexp(const _Tp& __x, int* __y)    { return _STLP_VENDOR_CSTD::frexp(__x, __y); } 
    1.67 -  static inline _Tp _do_ldexp(const _Tp& __x, int __y)    { return _STLP_VENDOR_CSTD::ldexp(__x, __y); } 
    1.68 -  static inline _Tp _do_modf(const _Tp& __x, double* __y) { return _STLP_VENDOR_CSTD::modf(__x, __y); }
    1.69 -  static inline _Tp _do_log(const _Tp& __x)     { return _STLP_VENDOR_CSTD::log(__x); } 
    1.70 -  static inline _Tp _do_log10(const _Tp& __x)   { return _STLP_VENDOR_CSTD::log10(__x); } 
    1.71 -  static inline _Tp _do_pow(const _Tp& __x, const _Tp& __y)    { return _STLP_VENDOR_CSTD::pow(__x, __y); } 
    1.72 -  static inline _Tp _do_pow(const _Tp& __x, int __y)    { return _STLP_VENDOR_CSTD::pow(__x, __y); } 
    1.73 -  static inline _Tp _do_sin(const _Tp& __x)     { return _STLP_VENDOR_CSTD::sin(__x); } 
    1.74 -  static inline _Tp _do_sinh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::sinh(__x); } 
    1.75 -
    1.76 -  static inline _Tp _do_sqrt(const _Tp& __x)    { return _STLP_VENDOR_CSTD::sqrt(__x); } 
    1.77 -  static inline _Tp _do_tan(const _Tp& __x)     { return _STLP_VENDOR_CSTD::tan(__x); } 
    1.78 -  static inline _Tp _do_tanh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::tanh(__x); } 
    1.79 -  static inline _Tp _do_exp(const _Tp& __x)     { return _STLP_VENDOR_CSTD::exp(__x); } 
    1.80 -  static inline _Tp _do_hypot(const _Tp& __x, const _Tp& __y)   { return _STLP_VENDOR_CSTD::hypot(__x, __y); } 
    1.81 -};
    1.82 -
    1.83 -#  define _STLP_DO_ABS(_Tp)   _STL_math_proxy<_Tp>::_do_abs
    1.84 -#  define _STLP_DO_ACOS(_Tp)  _STL_math_proxy<_Tp>::_do_acos
    1.85 -#  define _STLP_DO_ASIN(_Tp)  _STL_math_proxy<_Tp>::_do_asin
    1.86 -#  define _STLP_DO_ATAN(_Tp)  _STL_math_proxy<_Tp>::_do_atan
    1.87 -#  define _STLP_DO_ATAN2(_Tp) _STL_math_proxy<_Tp>::_do_atan2
    1.88 -#  define _STLP_DO_COS(_Tp)   _STL_math_proxy<_Tp>::_do_cos
    1.89 -#  define _STLP_DO_COSH(_Tp)  _STL_math_proxy<_Tp>::_do_cosh
    1.90 -#  define _STLP_DO_FLOOR(_Tp) _STL_math_proxy<_Tp>::_do_floor
    1.91 -#  define _STLP_DO_CEIL(_Tp) _STL_math_proxy<_Tp>::_do_ceil
    1.92 -#  define _STLP_DO_FMOD(_Tp) _STL_math_proxy<_Tp>::_do_fmod
    1.93 -#  define _STLP_DO_FREXP(_Tp) _STL_math_proxy<_Tp>::_do_frexp
    1.94 -#  define _STLP_DO_LDEXP(_Tp) _STL_math_proxy<_Tp>::_do_ldexp
    1.95 -#  define _STLP_DO_MODF(_Tp) _STL_math_proxy<_Tp>::_do_modf
    1.96 -#  define _STLP_DO_LOG(_Tp)   _STL_math_proxy<_Tp>::_do_log
    1.97 -#  define _STLP_DO_LOG10(_Tp) _STL_math_proxy<_Tp>::_do_log10
    1.98 -#  define _STLP_DO_POW(_Tp)   _STL_math_proxy<_Tp>::_do_pow
    1.99 -#  define _STLP_DO_SIN(_Tp)   _STL_math_proxy<_Tp>::_do_sin
   1.100 -#  define _STLP_DO_SINH(_Tp)  _STL_math_proxy<_Tp>::_do_sinh
   1.101 -#  define _STLP_DO_SQRT(_Tp)  _STL_math_proxy<_Tp>::_do_sqrt
   1.102 -#  define _STLP_DO_TAN(_Tp)   _STL_math_proxy<_Tp>::_do_tan
   1.103 -#  define _STLP_DO_TANH(_Tp)  _STL_math_proxy<_Tp>::_do_tanh
   1.104 -#  define _STLP_DO_EXP(_Tp)   _STL_math_proxy<_Tp>::_do_exp
   1.105 -#  define _STLP_DO_HYPOT(_Tp) _STL_math_proxy<_Tp>::_do_hypot
   1.106 -# else
   1.107 -#  define _STLP_DO_ABS(_Tp)   _STLP_VENDOR_CSTD::fabs
   1.108 -#  define _STLP_DO_ACOS(_Tp)  _STLP_VENDOR_CSTD::acos
   1.109 -#  define _STLP_DO_ASIN(_Tp)  _STLP_VENDOR_CSTD::asin
   1.110 -#  define _STLP_DO_ATAN(_Tp)  _STLP_VENDOR_CSTD::atan
   1.111 -#  define _STLP_DO_ATAN2(_Tp) _STLP_VENDOR_CSTD::atan2
   1.112 -#  define _STLP_DO_COS(_Tp)   _STLP_VENDOR_CSTD::cos
   1.113 -#  define _STLP_DO_COSH(_Tp)  _STLP_VENDOR_CSTD::cosh
   1.114 -#  define _STLP_DO_FLOOR(_Tp)  _STLP_VENDOR_CSTD::floor
   1.115 -#  define _STLP_DO_CEIL(_Tp)   _STLP_VENDOR_CSTD::ceil
   1.116 -#  define _STLP_DO_FMOD(_Tp)   _STLP_VENDOR_CSTD::fmod
   1.117 -#  define _STLP_DO_FREXP(_Tp) _STLP_VENDOR_CSTD::frexp
   1.118 -#  define _STLP_DO_LDEXP(_Tp) _STLP_VENDOR_CSTD::ldexp
   1.119 -#  define _STLP_DO_MODF(_Tp) _STLP_VENDOR_CSTD::modf
   1.120 -#  define _STLP_DO_LOG(_Tp)   _STLP_VENDOR_CSTD::log
   1.121 -#  define _STLP_DO_LOG10(_Tp) _STLP_VENDOR_CSTD::log10
   1.122 -#  define _STLP_DO_POW(_Tp)   _STLP_VENDOR_CSTD::pow
   1.123 -#  define _STLP_DO_SIN(_Tp)   _STLP_VENDOR_CSTD::sin
   1.124 -#  define _STLP_DO_SINH(_Tp)  _STLP_VENDOR_CSTD::sinh
   1.125 -#  define _STLP_DO_SQRT(_Tp)  _STLP_VENDOR_CSTD::sqrt
   1.126 -#  define _STLP_DO_TAN(_Tp)   _STLP_VENDOR_CSTD::tan
   1.127 -#  define _STLP_DO_TANH(_Tp)  _STLP_VENDOR_CSTD::tanh
   1.128 -#  define _STLP_DO_EXP(_Tp)   _STLP_VENDOR_CSTD::exp
   1.129 -#  define _STLP_DO_HYPOT(_Tp) ::hypot
   1.130 -# endif
   1.131 -
   1.132 -_STLP_END_NAMESPACE
   1.133 -
   1.134 -# if (defined (_STLP_HAS_NO_NEW_C_HEADERS) || defined(_STLP_MSVC) || defined (__ICL)) && !defined (_STLP_HAS_NO_NAMESPACES)
   1.135 -
   1.136 -#if (! defined (_STLP_USE_NEW_C_HEADERS)) && ! defined (_STLP_VXWORKS_TORNADO)
   1.137 -_STLP_BEGIN_NAMESPACE
   1.138 -
   1.139 -#  ifndef _STLP_HAS_NATIVE_FLOAT_ABS
   1.140 -inline double abs(double __x)                 { return _STLP_DO_ABS(double)(__x); }
   1.141 -inline float abs (float __x)                  { return _STLP_DO_ABS(float)(__x); }
   1.142 +#if (defined (__SUNPRO_CC) && (__SUNPRO_CC > 0x500)) || \
   1.143 +     !(defined (__IBMCPP__) && (__IBMCPP__ >= 500) || !(defined(__HP_aCC) && (__HP_aCC >= 30000) ))
   1.144 +#  ifndef _STLP_HAS_NO_NAMESPACES
   1.145 +namespace std {
   1.146 +#  endif
   1.147 +extern "C" double hypot(double x, double y);
   1.148 +#  ifndef _STLP_HAS_NO_NAMESPACES
   1.149 +}
   1.150  #  endif
   1.151  
   1.152 -#if  ( defined (__SYMBIAN32__) || defined (__WINS__))
   1.153 -inline double pow(double __x, int __y)        { return _STLP_DO_POW(double)(__x, __y); }
   1.154 -inline float acos (float __x)                 { return _STLP_DO_ACOS(float)(__x); }
   1.155 -inline float asin (float __x)                 { return _STLP_DO_ASIN(float)(__x); }
   1.156 -inline float atan (float __x)                 { return _STLP_DO_ATAN(float)(__x); }
   1.157 -inline float atan2(float __x, float __y)      { return _STLP_DO_ATAN2(float)(__x, __y); }
   1.158 -inline float ceil (float __x)                 { return _STLP_DO_CEIL(float)(__x); }
   1.159 -inline float cos (float __x)                  { return _STLP_DO_COS(float)(__x); }
   1.160 -inline float cosh (float __x)                 { return _STLP_DO_COSH(float)(__x); }
   1.161 -inline float exp (float __x)                  { return _STLP_DO_EXP(float)(__x); }
   1.162 -# ifdef _STLP_USE_NAMESPACES
   1.163 -inline float fabs (float __x)                 { return _STLP_DO_ABS(float)(__x); }
   1.164 -# endif
   1.165 -inline float floor(float __x)                 { return _STLP_DO_FLOOR(float)(__x); }
   1.166 -inline float fmod (float __x, float __y)      { return _STLP_DO_FMOD(float)(__x, __y); }
   1.167 -inline float frexp(float __x, int* __y)       { return _STLP_DO_FREXP(float)(__x, __y); }
   1.168 -inline float ldexp(float __x, int __y)        { return _STLP_DO_LDEXP(float)(__x, __y); }
   1.169 -// fbp : float versions are not always available
   1.170 -#if !defined(_STLP_VENDOR_LONG_DOUBLE_MATH)		//*ty 11/25/2001 - 
   1.171 -inline float modf (float __x, float* __y)     { 
   1.172 - #ifndef __SYMBIAN32__
   1.173 -  double __dd[2]; 
   1.174 -  double __res = _STLP_DO_MODF(double)((double)__x, __dd); 
   1.175 -  __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; 
   1.176 -  return (float)__res; 
   1.177 -#else
   1.178 -  float f = modff(__x, __y);
   1.179 -  return f;
   1.180 -#endif    
   1.181 -}
   1.182 -#else		//*ty 11/25/2001 - i.e. for apple SCpp
   1.183 -inline float modf (float __x, float* __y)     { 
   1.184 -  long double __dd[2]; 
   1.185 -  long double __res = _STLP_DO_MODF(long double)((long double)__x, __dd); 
   1.186 -  __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; 
   1.187 -  return (float)__res; 
   1.188 -}
   1.189 -#endif		//*ty 11/25/2001 - 
   1.190 -
   1.191 -inline float log (float __x)                  { return _STLP_DO_LOG(float)(__x); }
   1.192 -inline float log10(float __x)                 { return _STLP_DO_LOG10(float)(__x); }
   1.193 -inline float pow (float __x, float __y)       { return _STLP_DO_POW(float)(__x, __y); }
   1.194 -inline float pow (float __x, int __y)         { return _STLP_DO_POW(float)(__x, __y); }
   1.195 -inline float sin (float __x)                  { return _STLP_DO_SIN(float)(__x); }
   1.196 -inline float sinh (float __x)                 { return _STLP_DO_SINH(float)(__x); }
   1.197 -inline float sqrt (float __x)                 { return _STLP_DO_SQRT(float)(__x); }
   1.198 -inline float tan (float __x)                  { return _STLP_DO_TAN(float)(__x); }
   1.199 -inline float tanh (float __x)                 { return _STLP_DO_TANH(float)(__x); }
   1.200 -
   1.201 -#  if ! (defined  (_STLP_NO_LONG_DOUBLE) || defined(_STLP_VENDOR_LONG_DOUBLE_MATH))
   1.202 -
   1.203 -#if !( defined (__MVS__) || defined (_STLP_HAS_NATIVE_FLOAT_ABS))
   1.204 -inline long double abs (long double __x)                  { return _STLP_DO_ABS(long double)((double)__x); }
   1.205 -#endif
   1.206 -inline long double acos (long double __x)                 { return _STLP_DO_ACOS(long double)(__x); }
   1.207 -inline long double asin (long double __x)                 { return _STLP_DO_ASIN(long double)(__x); }
   1.208 -inline long double atan (long double __x)                 { return _STLP_DO_ATAN(long double)(__x); }
   1.209 -inline long double atan2(long double __x, long double __y)      { return _STLP_DO_ATAN2(long double)(__x, __y); }
   1.210 -inline long double ceil (long double __x)                 { return _STLP_DO_CEIL(long double)(__x); }
   1.211 -inline long double cos (long double __x)                  { return _STLP_DO_COS(long double)(__x); }
   1.212 -inline long double cosh (long double __x)                 { return _STLP_DO_COSH(long double)(__x); }
   1.213 -inline long double exp (long double __x)                  { return _STLP_DO_EXP(long double)(__x); }
   1.214 -inline long double fabs (long double __x)                 { return _STLP_DO_ABS(long double)(__x); }
   1.215 -inline long double floor(long double __x)                 { return _STLP_DO_FLOOR(long double)(__x); }
   1.216 -inline long double fmod (long double __x, long double __y)      { return _STLP_DO_FMOD(long double)(__x, __y); }
   1.217 -inline long double frexp(long double __x, int* __y)       { return _STLP_DO_FREXP(long double)(__x, __y); }
   1.218 -inline long double ldexp(long double __x, int __y)        { return _STLP_DO_LDEXP(long double)(__x, __y); }
   1.219 -// fbp : long double versions are not available
   1.220 -inline long double modf (long double __x, long double* __y)     { 
   1.221 -  double __dd[2]; 
   1.222 -  double __res = _STLP_DO_MODF(double)((double)__x, __dd); 
   1.223 -  __y[0] = (long double)__dd[0] ; __y[1] = (long double)__dd[1]; 
   1.224 -  return (long double)__res; 
   1.225 -}
   1.226 -inline long double log (long double __x)                  { return _STLP_DO_LOG(long double)(__x); }
   1.227 -inline long double log10(long double __x)                 { return _STLP_DO_LOG10(long double)(__x); }
   1.228 -inline long double pow (long double __x, long double __y)       { return _STLP_DO_POW(long double)(__x, __y); }
   1.229 -inline long double pow (long double __x, int __y)         { return _STLP_DO_POW(long double)(__x, __y); }
   1.230 -inline long double sin (long double __x)                  { return _STLP_DO_SIN(long double)(__x); }
   1.231 -inline long double sinh (long double __x)                 { return _STLP_DO_SINH(long double)(__x); }
   1.232 -inline long double sqrt (long double __x)                 { return _STLP_DO_SQRT(long double)(__x); }
   1.233 -inline long double tan (long double __x)                  { return _STLP_DO_TAN(long double)(__x); }
   1.234 -inline long double tanh (long double __x)                 { return _STLP_DO_TANH(long double)(__x); }
   1.235 -#endif
   1.236  #endif
   1.237  
   1.238 +#if defined (__sun) && defined (__GNUC__)
   1.239 +extern "C" {
   1.240 +  float __cosf(float v);
   1.241 +  float __sinf(float v);
   1.242 +  float __atan2f(float, float);
   1.243 +  float __coshf(float v);
   1.244 +  float __sinhf(float v);
   1.245 +  float __sqrtf(float v);
   1.246 +  float __expf(float v);
   1.247 +  float __logf(float v);
   1.248 +  float __log10f(float v);
   1.249 +
   1.250 +  long double __cosl(long double v);
   1.251 +  long double __sinl(long double v);
   1.252 +  long double __atan2l(long double, long double);
   1.253 +  long double __coshl(long double v);
   1.254 +  long double __sinhl(long double v);
   1.255 +  long double __sqrtl(long double v);
   1.256 +  long double __expl(long double v);
   1.257 +  long double __logl(long double v);
   1.258 +  long double __log10l(long double v);
   1.259 +}
   1.260 +
   1.261 +extern "C" {
   1.262 +  inline float cosf(float v) { return __cosf(v); }
   1.263 +  inline float sinf(float v) { return __sinf(v); }
   1.264 +  inline float atan2f(float v1, float v2) { return __atan2f(v1,v2); }
   1.265 +  inline float coshf(float v) { return __coshf(v); }
   1.266 +  inline float sinhf(float v) { return __sinhf(v); }
   1.267 +  inline float sqrtf(float v) { return __sqrtf(v); }
   1.268 +  inline float expf(float v) { return __expf(v); }
   1.269 +  inline float logf(float v) { return __logf(v); }
   1.270 +  inline float log10f(float v) { return __log10f(v); }
   1.271 +
   1.272 +  inline long double cosl(long double v) { return __cosl(v); }
   1.273 +  inline long double sinl(long double v) { return __sinl(v); }
   1.274 +  inline long double atan2l(long double v1, long double v2) { return __atan2l(v1,v2); }
   1.275 +  inline long double coshl(long double v) { return __coshl(v); }
   1.276 +  inline long double sinhl(long double v) { return __sinhl(v); }
   1.277 +  inline long double sqrtl(long double v) { return __sqrtl(v); }
   1.278 +  inline long double expl(long double v) { return __expl(v); }
   1.279 +  inline long double logl(long double v) { return __logl(v); }
   1.280 +  inline long double log10l(long double v) { return __log10l(v); }
   1.281 +}
   1.282 +#endif // __sun && __GNUC__
   1.283 +
   1.284 +#if defined (__sun)
   1.285 +extern "C" {
   1.286 +extern float __acosf(float);
   1.287 +extern float __asinf(float);
   1.288 +extern float __atanf(float);
   1.289 +extern float __atan2f(float, float);
   1.290 +extern float __ceilf(float);
   1.291 +extern float __cosf(float);
   1.292 +extern float __coshf(float);
   1.293 +extern float __expf(float);
   1.294 +extern float __fabsf(float);
   1.295 +extern float __floorf(float);
   1.296 +extern float __fmodf(float, float);
   1.297 +extern float __frexpf(float, int *);
   1.298 +extern float __ldexpf(float, int);
   1.299 +extern float __logf(float);
   1.300 +extern float __log10f(float);
   1.301 +extern float __modff(float, float *);
   1.302 +extern float __powf(float, float);
   1.303 +extern float __sinf(float);
   1.304 +extern float __sinhf(float);
   1.305 +extern float __sqrtf(float);
   1.306 +extern float __tanf(float);
   1.307 +extern float __tanhf(float);
   1.308 +
   1.309 +extern long double __acosl(long double);
   1.310 +extern long double __asinl(long double);
   1.311 +extern long double __atanl(long double);
   1.312 +extern long double __atan2l(long double, long double);
   1.313 +extern long double __ceill(long double);
   1.314 +extern long double __cosl(long double);
   1.315 +extern long double __coshl(long double);
   1.316 +extern long double __expl(long double);
   1.317 +extern long double __fabsl(long double);
   1.318 +extern long double __floorl(long double);
   1.319 +extern long double __fmodl(long double, long double);
   1.320 +extern long double __frexpl(long double, int *);
   1.321 +extern long double __ldexpl(long double, int);
   1.322 +extern long double __logl(long double);
   1.323 +extern long double __log10l(long double);
   1.324 +extern long double __modfl(long double, long double *);
   1.325 +extern long double __powl(long double, long double);
   1.326 +extern long double __sinl(long double);
   1.327 +extern long double __sinhl(long double);
   1.328 +extern long double __sqrtl(long double);
   1.329 +extern long double __tanl(long double);
   1.330 +extern long double __tanhl(long double);
   1.331 +}
   1.332 +#endif
   1.333 +
   1.334 +#if defined (__BORLANDC__)
   1.335 +#  define _STLP_CMATH_FUNC_NAMESPACE _STLP_VENDOR_CSTD
   1.336 +#else
   1.337 +#  define _STLP_CMATH_FUNC_NAMESPACE
   1.338 +#endif
   1.339 +
   1.340 +#if !defined (__sun) || defined (__GNUC__)
   1.341 +#  define _STLP_MATH_INLINE(float_type, func, cfunc) \
   1.342 +     inline float_type func (float_type x) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x); }
   1.343 +#  define _STLP_MATH_INLINE2(float_type, type, func, cfunc) \
   1.344 +     inline float_type func (float_type x, type y) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x, y); }
   1.345 +#  define _STLP_MATH_INLINE_D(float_type, func, cfunc)
   1.346 +#  define _STLP_MATH_INLINE2_D(float_type, type, func, cfunc)
   1.347 +#else
   1.348 +#  ifdef __SUNPRO_CC
   1.349 +#    define _STLP_MATH_INLINE(float_type, func, cfunc) \
   1.350 +       inline float_type func (float_type x) { return _STLP_VENDOR_CSTD::__##cfunc(x); }
   1.351 +#    define _STLP_MATH_INLINE_D(float_type, func, cfunc) \
   1.352 +       inline float_type func (float_type x) { return _STLP_VENDOR_CSTD::cfunc(x); }
   1.353 +#    define _STLP_MATH_INLINE2(float_type, type, func, cfunc) \
   1.354 +       inline float_type func (float_type x, type y) { return _STLP_VENDOR_CSTD::__##cfunc(x,y); }
   1.355 +#    define _STLP_MATH_INLINE2_D(float_type, type, func, cfunc) \
   1.356 +       inline float_type func (float_type x, type y) { return _STLP_VENDOR_CSTD::cfunc(x,y); }
   1.357 +#  else
   1.358 +#    error Unknown compiler for the Sun platform
   1.359 +#  endif
   1.360 +#endif
   1.361 +
   1.362 +/** macros to define math functions
   1.363 +These macros (having an X somewhere in the name) forward to the C library's
   1.364 +double functions but cast the arguments and return values to the given type. */
   1.365 +
   1.366 +#define _STLP_MATH_INLINEX(__type,func,cfunc) \
   1.367 +  inline __type func (__type x) \
   1.368 +  { return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x)); }
   1.369 +#define _STLP_MATH_INLINE2X(__type1,__type2,func,cfunc) \
   1.370 +  inline __type1 func (__type1 x, __type2 y) \
   1.371 +  { return __STATIC_CAST(__type1, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, y)); }
   1.372 +#define _STLP_MATH_INLINE2PX(__type,func,cfunc) \
   1.373 +  inline __type func (__type x, __type *y) { \
   1.374 +    double tmp1, tmp2; \
   1.375 +    tmp1 = _STLP_CMATH_FUNC_NAMESPACE::cfunc(__STATIC_CAST(double, x), &tmp2); \
   1.376 +    *y = __STATIC_CAST(__type, tmp2); \
   1.377 +    return __STATIC_CAST(__type, tmp1); \
   1.378 +  }
   1.379 +#define _STLP_MATH_INLINE2XX(__type,func,cfunc) \
   1.380 +  inline __type func (__type x, __type y) \
   1.381 +  { return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, (double)y)); }
   1.382 +
   1.383 +
   1.384 +/** rough characterization of compiler and native C library
   1.385 +For the compiler, it can either support long double or not. If it doesn't, the
   1.386 +macro _STLP_NO_LONG_DOUBLE is not defined and we don't define any long double
   1.387 +overloads.
   1.388 +For the native C library the question is whether it has variants with an 'f'
   1.389 +suffix (for float as opposed to double) or an 'l' suffix (for long double). If
   1.390 +the float variants are missing, _STLP_NO_VENDOR_MATH_F is defined, when the
   1.391 +long double variants are missing, _STLP_NO_VENDOR_MATH_L is defined. Of course
   1.392 +the latter doesn't make sense anyway when the compiler already has no long
   1.393 +double support.
   1.394 +
   1.395 +Those two traits determine a) which overloads get defined and b) how they are
   1.396 +defined.
   1.397 +
   1.398 +Meaning of suffixes:
   1.399 +""   : function returning and taking a float_type
   1.400 +"2"  : function returning a float_type and taking to float_types
   1.401 +"2P" : function returning a float_type and taking a float_type and a float_type*
   1.402 +"2PI": function returning a float_type and taking a float_type and an int*
   1.403 +"2I" : function returning a float_type and taking a float_Type and an int
   1.404 +*/
   1.405 +
   1.406 +#if !defined (_STLP_NO_LONG_DOUBLE) && !defined (_STLP_NO_VENDOR_MATH_L) && !defined (_STLP_NO_VENDOR_MATH_F)
   1.407 +   // long double support and both e.g. sinl(long double) and sinf(float)
   1.408 +   // This is the default for a correct and complete native library.
   1.409 +#  define _STLP_DEF_MATH_INLINE(func,cf) \
   1.410 +  _STLP_MATH_INLINE(float,func,cf##f) \
   1.411 +  _STLP_MATH_INLINE_D(double,func,cf) \
   1.412 +  _STLP_MATH_INLINE(long double,func,cf##l)
   1.413 +#  define _STLP_DEF_MATH_INLINE2(func,cf) \
   1.414 +  _STLP_MATH_INLINE2(float,float,func,cf##f) \
   1.415 +  _STLP_MATH_INLINE2_D(double,double,func,cf) \
   1.416 +  _STLP_MATH_INLINE2(long double,long double,func,cf##l)
   1.417 +#  define _STLP_DEF_MATH_INLINE2P(func,cf) \
   1.418 +  _STLP_MATH_INLINE2(float,float *,func,cf##f) \
   1.419 +  _STLP_MATH_INLINE2_D(double,double *,func,cf) \
   1.420 +  _STLP_MATH_INLINE2(long double,long double *,func,cf##l)
   1.421 +#  define _STLP_DEF_MATH_INLINE2PI(func,cf) \
   1.422 +  _STLP_MATH_INLINE2(float,int *,func,cf##f) \
   1.423 +  _STLP_MATH_INLINE2_D(double,int *,func,cf) \
   1.424 +  _STLP_MATH_INLINE2(long double,int *,func,cf##l)
   1.425 +#  define _STLP_DEF_MATH_INLINE2I(func,cf) \
   1.426 +  _STLP_MATH_INLINE2(float,int,func,cf##f) \
   1.427 +  _STLP_MATH_INLINE2_D(double,int,func,cf) \
   1.428 +  _STLP_MATH_INLINE2(long double,int,func,cf##l)
   1.429 +#else
   1.430 +#  if !defined (_STLP_NO_LONG_DOUBLE)
   1.431 +#    if !defined (_STLP_NO_VENDOR_MATH_F)
   1.432 +       // long double support and e.g. sinf(float) but not e.g. sinl(long double)
   1.433 +#      define _STLP_DEF_MATH_INLINE(func,cf) \
   1.434 +      _STLP_MATH_INLINE(float,func,cf##f) \
   1.435 +      _STLP_MATH_INLINEX(long double,func,cf)
   1.436 +#      define _STLP_DEF_MATH_INLINE2(func,cf) \
   1.437 +      _STLP_MATH_INLINE2(float,float,func,cf##f) \
   1.438 +      _STLP_MATH_INLINE2XX(long double,func,cf)
   1.439 +#      define _STLP_DEF_MATH_INLINE2P(func,cf) \
   1.440 +      _STLP_MATH_INLINE2(float,float *,func,cf##f) \
   1.441 +      _STLP_MATH_INLINE2PX(long double,func,cf)
   1.442 +#      define _STLP_DEF_MATH_INLINE2PI(func,cf) \
   1.443 +      _STLP_MATH_INLINE2(float,int *,func,cf##f) \
   1.444 +      _STLP_MATH_INLINE2X(long double,int *,func,cf)
   1.445 +#      define _STLP_DEF_MATH_INLINE2I(func,cf) \
   1.446 +      _STLP_MATH_INLINE2(float,int,func,cf##f) \
   1.447 +      _STLP_MATH_INLINE2X(long double,int,func,cf)
   1.448 +#    elif !defined (_STLP_NO_VENDOR_MATH_L)
   1.449 +       // long double support and e.g. sinl(long double) but not e.g. sinf(float)
   1.450 +#      define _STLP_DEF_MATH_INLINE(func,cf) \
   1.451 +      _STLP_MATH_INLINEX(float,func,cf) \
   1.452 +      _STLP_MATH_INLINE(long double,func,cf##l)
   1.453 +#      define _STLP_DEF_MATH_INLINE2(func,cf) \
   1.454 +      _STLP_MATH_INLINE2XX(float,func,cf) \
   1.455 +      _STLP_MATH_INLINE2(long double,long double,func,cf##l)
   1.456 +#      define _STLP_DEF_MATH_INLINE2P(func,cf) \
   1.457 +      _STLP_MATH_INLINE2PX(float,func,cf) \
   1.458 +      _STLP_MATH_INLINE2(long double,long double *,func,cf##l)
   1.459 +#      define _STLP_DEF_MATH_INLINE2PI(func,cf) \
   1.460 +      _STLP_MATH_INLINE2X(float,int *,func,cf) \
   1.461 +      _STLP_MATH_INLINE2(long double,int *,func,cf##l)
   1.462 +#      define _STLP_DEF_MATH_INLINE2I(func,cf) \
   1.463 +      _STLP_MATH_INLINE2X(float,int,func,cf) \
   1.464 +      _STLP_MATH_INLINE2(long double,int,func,cf##l)
   1.465 +#    else
   1.466 +#      define _STLP_DEF_MATH_INLINE(func,cf) \
   1.467 +      _STLP_MATH_INLINEX(float,func,cf) \
   1.468 +      _STLP_MATH_INLINEX(long double,func,cf)
   1.469 +#      define _STLP_DEF_MATH_INLINE2(func,cf) \
   1.470 +      _STLP_MATH_INLINE2XX(float,func,cf) \
   1.471 +      _STLP_MATH_INLINE2XX(long double,func,cf)
   1.472 +#      define _STLP_DEF_MATH_INLINE2P(func,cf) \
   1.473 +      _STLP_MATH_INLINE2PX(float,func,cf) \
   1.474 +      _STLP_MATH_INLINE2PX(long double,func,cf)
   1.475 +#      define _STLP_DEF_MATH_INLINE2PI(func,cf) \
   1.476 +      _STLP_MATH_INLINE2X(float,int *,func,cf) \
   1.477 +      _STLP_MATH_INLINE2X(long double,int *,func,cf)
   1.478 +#      define _STLP_DEF_MATH_INLINE2I(func,cf) \
   1.479 +      _STLP_MATH_INLINE2X(float,int,func,cf) \
   1.480 +      _STLP_MATH_INLINE2X(long double,int,func,cf)
   1.481 +#    endif
   1.482 +#  else
   1.483 +#    if !defined (_STLP_NO_VENDOR_MATH_F)
   1.484 +#      define _STLP_DEF_MATH_INLINE(func,cf) \
   1.485 +      _STLP_MATH_INLINE(float,func,cf##f)
   1.486 +#      define _STLP_DEF_MATH_INLINE2(func,cf) \
   1.487 +      _STLP_MATH_INLINE2(float,float,func,cf##f)
   1.488 +#      define _STLP_DEF_MATH_INLINE2P(func,cf) \
   1.489 +      _STLP_MATH_INLINE2(float,float *,func,cf##f)
   1.490 +#      define _STLP_DEF_MATH_INLINE2PI(func,cf) \
   1.491 +      _STLP_MATH_INLINE2(float,int *,func,cf##f)
   1.492 +#      define _STLP_DEF_MATH_INLINE2I(func,cf) \
   1.493 +      _STLP_MATH_INLINE2(float,int,func,cf##f)
   1.494 +#    else // _STLP_NO_VENDOR_MATH_F
   1.495 +       // neither long double support nor e.g. sinf(float) functions
   1.496 +#      define _STLP_DEF_MATH_INLINE(func,cf) \
   1.497 +      _STLP_MATH_INLINEX(float,func,cf)
   1.498 +#      define _STLP_DEF_MATH_INLINE2(func,cf) \
   1.499 +      _STLP_MATH_INLINE2XX(float,func,cf)
   1.500 +#      define _STLP_DEF_MATH_INLINE2P(func,cf) \
   1.501 +      _STLP_MATH_INLINE2PX(float,func,cf)
   1.502 +#      define _STLP_DEF_MATH_INLINE2PI(func,cf) \
   1.503 +      _STLP_MATH_INLINE2X(float,int *,func,cf)
   1.504 +#      define _STLP_DEF_MATH_INLINE2I(func,cf) \
   1.505 +      _STLP_MATH_INLINE2X(float,int,func,cf)
   1.506 +#    endif // _STLP_NO_VENDOR_MATH_F
   1.507 +#  endif
   1.508 +#endif
   1.509 +
   1.510 +#if defined (_STLP_WCE) || \
   1.511 +   (defined(_STLP_MSVC) && (_STLP_MSVC <= 1300) && defined (_MSC_EXTENSIONS) /* && !defined(_STLP_WCE_NET) */)
   1.512 +/*
   1.513 + * dums: VC6 has all the required C++ functions but only define them if
   1.514 + * _MSC_EXTENSIONS is not defined (a bug?). STLport just do the same
   1.515 + * thing also when _MSC_EXTENSIONS is defined.
   1.516 + * TODO: above check (_STLP_MSVC <= 1300) also catches VC7.0, is that intended?
   1.517 + */
   1.518 +//We have to tell the compilers that abs, acos ... math functions are not intrinsic
   1.519 +//otherwise we have Internal Compiler Error in release mode...
   1.520 +#  pragma warning(push)
   1.521 +#  pragma warning(disable: 4162) // no function with C linkage found
   1.522 +#  pragma warning(disable: 4163) // not available as an intrinsic function
   1.523 +#  pragma function (abs, acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, sqrt, tan, tanh)
   1.524 +#  if defined (_STLP_WCE)
   1.525 +#    pragma function (ceil, floor)
   1.526 +#  endif
   1.527 +#  define _STLP_RESTORE_FUNCTION_INTRINSIC
   1.528 +#endif // _STLP_MSVC && _STLP_MSVC <= 1300 && !_STLP_WCE && _MSC_EXTENSIONS
   1.529 +
   1.530 +#if defined (__BORLANDC__) && defined (_STLP_USE_NEW_C_HEADERS)
   1.531 +/* In this config Borland native lib only define functions in std namespace.
   1.532 + * In order to have all overloads in STLport namespace we need to add the
   1.533 + * double overload in global namespace. We do not use a using statement to avoid
   1.534 + * import of invalid overload.
   1.535 + */
   1.536 +#  define _STLP_DMATH_INLINE(func) _STLP_MATH_INLINE(double, func, func)
   1.537 +#  define _STLP_DMATH_INLINE2(func) _STLP_MATH_INLINE2(double, double, func, func)
   1.538 +
   1.539 +_STLP_DMATH_INLINE(acos)
   1.540 +_STLP_DMATH_INLINE(asin)
   1.541 +_STLP_DMATH_INLINE(atan)
   1.542 +_STLP_DMATH_INLINE2(atan2)
   1.543 +_STLP_DMATH_INLINE(ceil)
   1.544 +_STLP_DMATH_INLINE(cos)
   1.545 +_STLP_DMATH_INLINE(cosh)
   1.546 +_STLP_DMATH_INLINE(exp)
   1.547 +_STLP_DMATH_INLINE(fabs)
   1.548 +_STLP_DMATH_INLINE(floor)
   1.549 +_STLP_DMATH_INLINE2(fmod)
   1.550 +_STLP_MATH_INLINE2X(double, int*, frexp, frexp)
   1.551 +_STLP_MATH_INLINE2X(double, int, ldexp, ldexp)
   1.552 +_STLP_DMATH_INLINE(log)
   1.553 +_STLP_DMATH_INLINE(log10)
   1.554 +_STLP_MATH_INLINE2PX(double, modf, modf)
   1.555 +_STLP_DMATH_INLINE(sin)
   1.556 +_STLP_DMATH_INLINE(sinh)
   1.557 +_STLP_DMATH_INLINE(sqrt)
   1.558 +_STLP_DMATH_INLINE(tan)
   1.559 +_STLP_DMATH_INLINE(tanh)
   1.560 +_STLP_DMATH_INLINE2(pow)
   1.561 +_STLP_DMATH_INLINE2(hypot)
   1.562 +
   1.563 +#  undef _STLP_DMATH_INLINE
   1.564 +#  undef _STLP_DMATH_INLINE2
   1.565 +#endif
   1.566 +
   1.567 +#if defined (__DMC__)
   1.568 +#  if defined (fabs)
   1.569 +inline double __stlp_fabs(double __x) { return fabs(__x); }
   1.570 +#    undef fabs
   1.571 +inline double fabs(double __x) { return __stlp_fabs(__x); }
   1.572 +#  endif
   1.573 +#  if defined (cos)
   1.574 +inline double __stlp_cos(double __x) { return cos(__x); }
   1.575 +#    undef cos
   1.576 +inline double cos(double __x) { return __stlp_cos(__x); }
   1.577 +#  endif
   1.578 +#  if defined (sin)
   1.579 +inline double __stlp_sin(double __x) { return sin(__x); }
   1.580 +#    undef sin
   1.581 +inline double sin(double __x) { return __stlp_sin(__x); }
   1.582 +#  endif
   1.583 +#  if defined (sqrt)
   1.584 +inline double __stlp_sqrt(double __x) { return sqrt(__x); }
   1.585 +#    undef sqrt
   1.586 +inline double sqrt(double __x) { return __stlp_sqrt(__x); }
   1.587 +#  endif
   1.588 +#  if defined (ldexp)
   1.589 +inline double __stlp_ldexp(double __x, int __y) { return ldexp(__x, __y); }
   1.590 +#    undef ldexp
   1.591 +inline double ldexp(double __x, int __y) { return __stlp_ldexp(__x, __y); }
   1.592 +#  endif
   1.593 +#endif
   1.594 +
   1.595 +/* MSVC native lib starting with .Net 2003 has already all math functions
   1.596 + * in global namespace.
   1.597 + * HP-UX native lib has math functions in the global namespace.
   1.598 + */
   1.599 +#if (!defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1310) || defined(UNDER_CE)) && \
   1.600 +    (!defined (__HP_aCC) || (__HP_aCC < 30000))
   1.601 +inline double abs(double __x)
   1.602 +{ return ::fabs(__x); }
   1.603 +#  if !defined (__MVS__)
   1.604 +_STLP_DEF_MATH_INLINE(abs, fabs)
   1.605 +#  else // __MVS__ has native long double abs?
   1.606 +inline float abs(float __x) { return ::fabsf(__x); }
   1.607 +#  endif
   1.608 +
   1.609 +_STLP_DEF_MATH_INLINE(acos, acos)
   1.610 +_STLP_DEF_MATH_INLINE(asin, asin)
   1.611 +_STLP_DEF_MATH_INLINE(atan, atan)
   1.612 +_STLP_DEF_MATH_INLINE2(atan2, atan2)
   1.613 +_STLP_DEF_MATH_INLINE(ceil, ceil)
   1.614 +_STLP_DEF_MATH_INLINE(cos, cos)
   1.615 +_STLP_DEF_MATH_INLINE(cosh, cosh)
   1.616 +_STLP_DEF_MATH_INLINE(exp, exp)
   1.617 +_STLP_DEF_MATH_INLINE(fabs, fabs)
   1.618 +_STLP_DEF_MATH_INLINE(floor, floor)
   1.619 +_STLP_DEF_MATH_INLINE2(fmod, fmod)
   1.620 +_STLP_DEF_MATH_INLINE2PI(frexp, frexp)
   1.621 +_STLP_DEF_MATH_INLINE2I(ldexp, ldexp)
   1.622 +_STLP_DEF_MATH_INLINE(log, log)
   1.623 +_STLP_DEF_MATH_INLINE(log10, log10)
   1.624 +_STLP_DEF_MATH_INLINE2P(modf, modf)
   1.625 +_STLP_DEF_MATH_INLINE(sin, sin)
   1.626 +_STLP_DEF_MATH_INLINE(sinh, sinh)
   1.627 +_STLP_DEF_MATH_INLINE(sqrt, sqrt)
   1.628 +_STLP_DEF_MATH_INLINE(tan, tan)
   1.629 +_STLP_DEF_MATH_INLINE(tanh, tanh)
   1.630 +_STLP_DEF_MATH_INLINE2(pow, pow)
   1.631 +
   1.632 +#  if !defined(_STLP_MSVC) /* || (_STLP_MSVC > 1300) */ || defined(_STLP_WCE) || !defined (_MSC_EXTENSIONS) /* && !defined(_STLP_WCE_NET) */
   1.633 +#    ifndef _STLP_NO_VENDOR_MATH_F
   1.634 +#      ifndef __sun
   1.635 +inline float pow(float __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::powf(__x, __STATIC_CAST(float,__y)); }
   1.636 +#      else
   1.637 +inline float pow(float __x, int __y) { return ::__powf(__x, __STATIC_CAST(float,__y)); }
   1.638 +#      endif
   1.639 +#    else
   1.640 +inline float pow(float __x, int __y) { return __STATIC_CAST(float, _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(float,__y))); }
   1.641 +#    endif
   1.642 +inline double pow(double __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(double,__y)); }
   1.643 +#    if !defined (_STLP_NO_LONG_DOUBLE)
   1.644 +#      if !defined(_STLP_NO_VENDOR_MATH_L)
   1.645 +#        ifndef __sun
   1.646 +inline long double pow(long double __x, int __y) { return _STLP_CMATH_FUNC_NAMESPACE::powl(__x, __STATIC_CAST(long double,__y)); }
   1.647 +#        else
   1.648 +#          ifndef __SUNPRO_CC
   1.649 +inline long double pow(long double __x, int __y) { return ::__powl(__x, __STATIC_CAST(long double,__y)); }
   1.650 +#          else
   1.651 +inline long double pow(long double __x, int __y) { return _STLP_VENDOR_CSTD::__powl(__x, __STATIC_CAST(long double,__y)); }
   1.652 +#          endif
   1.653 +#        endif
   1.654 +#      else
   1.655 +inline long double pow(long double __x, int __y) { return __STATIC_CAST(long double, _STLP_CMATH_FUNC_NAMESPACE::pow(__x, __STATIC_CAST(long double,__y))); }
   1.656 +#      endif
   1.657 +#    endif
   1.658 +#  else
   1.659 +//The MS native pow version has a bugged overload so it is not imported
   1.660 +//in the STLport namespace.
   1.661 +//Here is the bugged version:
   1.662 +//inline double pow(int __x, int __y)            { return (_Pow_int(__x, __y)); }
   1.663 +inline double      pow(double __x, int __y)      { return (_Pow_int(__x, __y)); }
   1.664 +inline float       pow(float __x, int __y)       { return (_Pow_int(__x, __y)); }
   1.665 +inline long double pow(long double __x, int __y) { return (_Pow_int(__x, __y)); }
   1.666 +#  endif
   1.667 +#endif
   1.668 +
   1.669 +#if (defined (_STLP_MSVC) && !defined (_STLP_WCE)) || defined (__ICL) || defined (__sun)
   1.670 +#  if defined (_STLP_MSVC) && (_STLP_MSVC >= 1400)
   1.671 +#    pragma warning (push)
   1.672 +#    pragma warning (disable : 4996) // hypot is deprecated.
   1.673 +#  endif
   1.674 +_STLP_MATH_INLINE2XX(float, hypot, hypot)
   1.675 +inline long double hypot(long double x, long double y) { return sqrt(x * x + y * y); }
   1.676 +#  if defined (_STLP_MSVC) && (_STLP_MSVC >= 1400)
   1.677 +#    pragma warning (pop)
   1.678 +#  endif
   1.679 +#else
   1.680 +#  if defined (_STLP_USE_UCLIBC)
   1.681 +inline double hypot(double x, double y) { return sqrt(x * x + y * y); }
   1.682 +_STLP_DEF_MATH_INLINE2(hypot, hypot)
   1.683 +#  elif defined (_STLP_WCE)
   1.684 +   /* CE has a double _hypot(double,double) which we use */
   1.685 +inline double hypot(double __x, double __y) { return _hypot(__x,__y); }
   1.686 +_STLP_DEF_MATH_INLINE2(hypot, _hypot)
   1.687 +#  endif
   1.688 +#endif
   1.689 +
   1.690 +#if defined (_STLP_RESTORE_FUNCTION_INTRINSIC)
   1.691 +//restoration of the default intrinsic status of those functions:
   1.692 +#  pragma intrinsic (abs, acos, asin, atan, atan2, cos, cosh, exp, fabs, fmod, log, log10, sin, sinh, sqrt, tan, tanh)
   1.693 +#  if defined (_STLP_WCE)
   1.694 +#    pragma intrinsic (ceil, floor)
   1.695 +#  endif
   1.696 +#  pragma warning(pop)
   1.697 +#  undef _STLP_RESTORE_FUNCTION_INTRINSIC
   1.698 +#endif // _STLP_MSVC && _STLP_MSVC <= 1300 && !_STLP_WCE && _MSC_EXTENSIONS
   1.699 +
   1.700 +/* C++ Standard is unclear about several call to 'using ::func' if new overloads
   1.701 + * of ::func appears between 2 successive 'using' calls. To avoid this potential
   1.702 + * problem we provide all abs overload before the 'using' call.
   1.703 + * Beware: This header inclusion has to be after all abs overload of this file.
   1.704 + *         The first 'using ::abs' call is going to be in the other header.
   1.705 + */
   1.706 +#ifndef _STLP_INTERNAL_CSTDLIB
   1.707 +#  include <stl/_cstdlib.h>
   1.708 +#endif
   1.709 +
   1.710 +#if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
   1.711 +_STLP_BEGIN_NAMESPACE
   1.712 +using ::abs;
   1.713 +using ::acos;
   1.714 +using ::asin;
   1.715 +using ::atan;
   1.716 +using ::atan2;
   1.717 +using ::ceil;
   1.718 +using ::cos;
   1.719 +using ::cosh;
   1.720 +using ::exp;
   1.721 +using ::fabs;
   1.722 +using ::floor;
   1.723 +using ::fmod;
   1.724 +using ::frexp;
   1.725 +using ::hypot;
   1.726 +using ::ldexp;
   1.727 +using ::log;
   1.728 +using ::log10;
   1.729 +using ::modf;
   1.730 +using ::pow;
   1.731 +using ::sin;
   1.732 +using ::sinh;
   1.733 +using ::sqrt;
   1.734 +using ::tan;
   1.735 +using ::tanh;
   1.736  _STLP_END_NAMESPACE
   1.737 +#  if defined (__BORLANDC__) && (__BORLANDC__ >= 0x560)
   1.738 +using _STLP_VENDOR_CSTD::_ecvt;
   1.739 +using _STLP_VENDOR_CSTD::_fcvt;
   1.740 +#  endif
   1.741 +#endif
   1.742  
   1.743 -# endif /* NEW_C_HEADERS */
   1.744 -# endif /* NEW_C_HEADERS */
   1.745 +#endif /* _STLP_INTERNAL_CMATH */
   1.746  
   1.747 -#endif /* CMATH_H */
   1.748 +// Local Variables:
   1.749 +// mode:C++
   1.750 +// End: