Ruby 1.9.3p327(2012-11-10revision37606)
missing/cbrt.c
Go to the documentation of this file.
00001 #include "ruby/missing.h"
00002 #include <math.h>
00003 
00004 double cbrt(double x)
00005 {
00006     if (x < 0)
00007         return -pow(-x, 1/3.0);
00008     else
00009         return pow(x, 1/3.0);
00010 }
00011 
00012