Ruby
3.3.7p123 (2025-01-15 revision be31f993d7fa0219d85f7b3c694d454da4ecc10b)
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.13.1