Ruby: missing/cbrt.c Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

cbrt.c
Go to the documentation of this file.
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
cbrt
double cbrt(double x)
Definition: cbrt.c:4
missing.h
Prototype for *.c in ./missing, and for missing timeval struct.
math.h
Internal header for Math.