Header <tgmath.h> provides a type-generic macro version of this function.
Additional overloads are provided in this header (<cmath>) for the integral types: These overloads effectively cast x to a double before calculations (defined for T being any integral type).
Parameters
x
Value whose cubic root is computed.
Return Value
Cubic root of x.
Example
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;
}