summaryrefslogtreecommitdiffstats
path: root/missing/cbrt.c
blob: 54db2703a0844dceb1fe36fecaae9c9daaa8c56c (plain)
1
2
3
4
5
6
7
8
9
10
#include <math.h>

double cbrt(double x)
{
    if (x < 0)
        return -pow(-x, 1/3.0);
    else
        return pow(x, 1/3.0);
}