Ruby 3.4.9p82 (2026-03-11 revision 76cca827ab52ab1d346a728f068d5b8da3e2952b)
cbrt.c
1#include "ruby/missing.h"
2#include <math.h>
3
4double 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