]> pd.if.org Git - pdclib/blobdiff - functions/math/cbrt.c
Introducing personalities. Removing C++ function decs / defs.
[pdclib] / functions / math / cbrt.c
index cf6d16b8a0376ed73c0fa06c8f7891dbb00a6017..64185aa037036737f3ea66b7838fec76044ff2fb 100644 (file)
@@ -5,15 +5,19 @@
 // This code is Public Domain. Use, modify, and redistribute at will.
 // ----------------------------------------------------------------------------
 
-// ----------------------------------------------------------------------------
-// C++
+double cbrt( double x ) { /* TODO */ };
 
-float cbrt( float x ) { /* TODO */ };
-long double cbrt( long 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;
+}
+*/
 
-// ----------------------------------------------------------------------------
-// Standard C
-
-double cbrt( double x ) { /* TODO */ };
 float cbrtf( float x ) { /* TODO */ };
 long double cbrtl( long double x ) { /* TODO */ };