All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
cbrt.h File Reference

Provide the function cbrt (gcc specific) to all platforms. More...

#include <cmath>
Include dependency graph for cbrt.h:

Go to the source code of this file.

Macros

#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.

Macro Definition Documentation

#define cbrt_for_int_type (   t)    inline double cbrt( t __x ) { return cbrt ( static_cast<double>(__x) ); }

Definition at line 51 of file cbrt.h.

Function Documentation

double cbrt ( double  __x)
inline

Definition at line 22 of file cbrt.h.

22  {
23  return ::pow( __x, static_cast<double>(1.0/3.0) );
24 }
float cbrt ( float  __x)
inline

Definition at line 28 of file cbrt.h.

28  {
29 #ifdef __GNUC__
30  return ::cbrtf( __x );
31 #else
32  return ::pow( __x, static_cast<float>(1.0/3.0) );
33 #endif
34 }
long double cbrt ( long double  __x)
inline

Definition at line 37 of file cbrt.h.

37  {
38 #ifdef __GNUC__
39  return ::cbrtl( __x );
40 #else
41  return ::pow( __x, static_cast<long double>(1.0/3.0) );
42 #endif
43 }