double cbrt (double x); float cbrtf (float x);long double cbrtl (long double x);
double cbrt (double x); float cbrt (float x);long double cbrt (long double x); double cbrt (T x); // additional overloads for integral types
<cmath> ) for the integral types: These overloads effectively cast x to a double before calculations (defined for T being any integral type ).1
2
3
4
5
6
7
8
9
10
11
12
/* cbrt example */
#include <stdio.h> /* printf */
#include <math.h> /* cbrt */
int main ()
{
double param, result;
param = 27.0;
result = cbrt (param);
printf ("cbrt (%f) = %f\n", param, result);
return 0;
}
cbrt (27.000000) = 3.000000