]> pd.if.org Git - pdclib/blobdiff - functions/math/cbrt.c
Merged PDPCLIB and Therx code.
[pdclib] / functions / math / cbrt.c
index cf6d16b8a0376ed73c0fa06c8f7891dbb00a6017..86ef6906314ebf8cdac7f38ad747e2e1a90db5ce 100644 (file)
@@ -15,5 +15,18 @@ long double cbrt( long double x ) { /* TODO */ };
 // Standard C
 
 double cbrt( double x ) { /* TODO */ };
+
+/* Therx code
+{
+    double i = x / 4;
+    // (15 DP) HOW GET MORE?
+    while ( ( fabs( i - ( x / i / i ) ) / i ) > 0.00000000000001 )
+    {
+        i = ( i + ( x / i / i ) + i ) / 3;
+    }
+    return i;
+}
+*/
+
 float cbrtf( float x ) { /* TODO */ };
 long double cbrtl( long double x ) { /* TODO */ };