* 2022-01-18 [ci skip]
[ruby-80x24.org.git] / missing / cbrt.c
blob1bcbc63392b081388846798634919cc280070c6b
1 #include "ruby/missing.h"
2 #include <math.h>
4 double cbrt(double x)
6 if (x < 0)
7 return -pow(-x, 1/3.0);
8 else
9 return pow(x, 1/3.0);