cbrt - C math.h

C examples for math.h:cbrt

Type

function

From

<cmath>
<ctgmath>
<math.h>

Description

Compute cubic root

Prototype

long double cbrtl (long double x);
long double cbrt (long double x);
     double cbrt  (double x);
      float cbrtf (float x);
      float cbrt (float x);
     double cbrt (T x);           

Parameters

Parameter Description
x Value whose cubit root is computed.

Return Value

Cubic root of x.

Example

Demo Code

#include <stdio.h>
#include <math.h> /* cbrt */

int main ()//from www. jav  a  2  s  .  c o m
{
  double param = 27.0;
  double result = cbrt (param);
  printf ("cbrt (%f) = %f\n", param, result);
  return 0;
}

Related Tutorials