/home/ntakagi/work/STLport-5.1.5/stlport/stl/_cmath.h File Reference#include <math.h>
#include <stl/_cstdlib.h>
Go to the source code of this file.
|
Defines |
#define | _STLP_CMATH_FUNC_NAMESPACE |
#define | _STLP_MATH_INLINE(float_type, func, cfunc) inline float_type func (float_type x) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x); } |
#define | _STLP_MATH_INLINE2(float_type, type, func, cfunc) inline float_type func (float_type x, type y) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x, y); } |
#define | _STLP_MATH_INLINE_D(float_type, func, cfunc) |
#define | _STLP_MATH_INLINE2_D(float_type, type, func, cfunc) |
#define | _STLP_MATH_INLINEX(__type, func, cfunc) |
#define | _STLP_MATH_INLINE2X(__type1, __type2, func, cfunc) |
#define | _STLP_MATH_INLINE2PX(__type, func, cfunc) |
#define | _STLP_MATH_INLINE2XX(__type, func, cfunc) |
#define | _STLP_DEF_MATH_INLINE(func, cf) |
#define | _STLP_DEF_MATH_INLINE2(func, cf) |
#define | _STLP_DEF_MATH_INLINE2P(func, cf) |
#define | _STLP_DEF_MATH_INLINE2PI(func, cf) |
#define | _STLP_DEF_MATH_INLINE2I(func, cf) |
Functions |
double | abs (double __x) |
float | pow (float __x, int __y) |
double | pow (double __x, int __y) |
long double | pow (long double __x, int __y) |
Define Documentation
#define _STLP_CMATH_FUNC_NAMESPACE |
#define _STLP_DEF_MATH_INLINE |
( |
func, |
|
|
cf |
|
) |
|
Value: rough characterization of compiler and native C library For the compiler, it can either support long double or not. If it doesn't, the macro _STLP_NO_LONG_DOUBLE is not defined and we don't define any long double overloads. For the native C library the question is whether it has variants with an 'f' suffix (for float as opposed to double) or an 'l' suffix (for long double). If the float variants are missing, _STLP_NO_VENDOR_MATH_F is defined, when the long double variants are missing, _STLP_NO_VENDOR_MATH_L is defined. Of course the latter doesn't make sense anyway when the compiler already has no long double support.
Those two traits determine a) which overloads get defined and b) how they are defined.
Meaning of suffixes: "" : function returning and taking a float_type "2" : function returning a float_type and taking to float_types "2P" : function returning a float_type and taking a float_type and a float_type* "2PI": function returning a float_type and taking a float_type and an int* "2I" : function returning a float_type and taking a float_Type and an int
Definition at line 222 of file _cmath.h.
#define _STLP_DEF_MATH_INLINE2 |
( |
func, |
|
|
cf |
|
) |
|
#define _STLP_DEF_MATH_INLINE2I |
( |
func, |
|
|
cf |
|
) |
|
#define _STLP_DEF_MATH_INLINE2P |
( |
func, |
|
|
cf |
|
) |
|
#define _STLP_DEF_MATH_INLINE2PI |
( |
func, |
|
|
cf |
|
) |
|
#define _STLP_MATH_INLINE |
( |
float_type, |
|
|
func, |
|
|
cfunc |
|
) |
inline float_type func (float_type x) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x); } |
#define _STLP_MATH_INLINE2 |
( |
float_type, |
|
|
type, |
|
|
func, |
|
|
cfunc |
|
) |
inline float_type func (float_type x, type y) { return _STLP_CMATH_FUNC_NAMESPACE::cfunc(x, y); } |
#define _STLP_MATH_INLINE2_D |
( |
float_type, |
|
|
type, |
|
|
func, |
|
|
cfunc |
|
) |
|
#define _STLP_MATH_INLINE2PX |
( |
__type, |
|
|
func, |
|
|
cfunc |
|
) |
|
Value: inline __type func (__type x, __type *y) { \
double tmp1, tmp2; \
tmp1 = _STLP_CMATH_FUNC_NAMESPACE::cfunc(__STATIC_CAST(double, x), &tmp2); \
*y = __STATIC_CAST(__type, tmp2); \
return __STATIC_CAST(__type, tmp1); \
}
Definition at line 185 of file _cmath.h.
#define _STLP_MATH_INLINE2X |
( |
__type1, |
|
|
__type2, |
|
|
func, |
|
|
cfunc |
|
) |
|
Value: inline __type1 func (__type1 x, __type2 y) \
{ return __STATIC_CAST(__type1, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, y)); }
Definition at line 182 of file _cmath.h.
#define _STLP_MATH_INLINE2XX |
( |
__type, |
|
|
func, |
|
|
cfunc |
|
) |
|
Value: inline __type func (__type x, __type y) \
{ return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x, (double)y)); }
Definition at line 192 of file _cmath.h.
#define _STLP_MATH_INLINE_D |
( |
float_type, |
|
|
func, |
|
|
cfunc |
|
) |
|
#define _STLP_MATH_INLINEX |
( |
__type, |
|
|
func, |
|
|
cfunc |
|
) |
|
Value: inline __type func (__type x) \
{ return __STATIC_CAST(__type, _STLP_CMATH_FUNC_NAMESPACE::cfunc((double)x)); }
macros to define math functions These macros (having an X somewhere in the name) forward to the C library's double functions but cast the arguments and return values to the given type.
Definition at line 179 of file _cmath.h.
Function Documentation
double abs |
( |
double |
__x |
) |
[inline] |
long double pow |
( |
long double |
__x, |
|
|
int |
__y | |
|
) |
| | [inline] |
double pow |
( |
double |
__x, |
|
|
int |
__y | |
|
) |
| | [inline] |
float pow |
( |
float |
__x, |
|
|
int |
__y | |
|
) |
| | [inline] |
Generated on Mon Mar 10 15:32:48 2008 by
1.5.1
|