Ruby
3.5.0dev (2025-06-27 revision fe9a3be2966b0e54b93e9349bf47d4e5b879a6e1)
missing
cbrt.c
1
#include "ruby/missing.h"
2
#include <math.h>
3
4
double
cbrt(
double
x)
5
{
6
if
(x < 0)
7
return
-pow(-x, 1/3.0);
8
else
9
return
pow(x, 1/3.0);
10
}
11
Generated by
1.9.8