Provide the function cbrt (gcc specific) to all platforms.
More...
#include <cmath>
Go to the source code of this file.
Defines |
| #define | cbrt_for_int_type(t) inline double cbrt( t __x ) { return cbrt ( static_cast<double>(__x) ); } |
Functions |
| double | cbrt (double __x) |
| float | cbrt (float __x) |
| long double | cbrt (long double __x) |
Detailed Description
Provide the function cbrt (gcc specific) to all platforms.
- Author:
- Marco Clemencic (form an idea of Chris Jones)
- Date:
- 27/07/2007
Definition in file cbrt.h.
Define Documentation
| #define cbrt_for_int_type |
( |
|
t ) |
inline double cbrt( t __x ) { return cbrt ( static_cast<double>(__x) ); } |
Function Documentation
| double cbrt |
( |
double |
__x ) |
[inline] |
Definition at line 22 of file cbrt.h.
{
return ::pow( __x, static_cast<double>(1.0/3.0) );
}
| long double cbrt |
( |
long double |
__x ) |
[inline] |
Definition at line 37 of file cbrt.h.
{
#ifdef __GNUC__
return ::cbrtl( __x );
#else
return ::pow( __x, static_cast<long double>(1.0/3.0) );
#endif
}
| float cbrt |
( |
float |
__x ) |
[inline] |
Definition at line 28 of file cbrt.h.
{
#ifdef __GNUC__
return ::cbrtf( __x );
#else
return ::pow( __x, static_cast<float>(1.0/3.0) );
#endif
}