projects
/
fw
/
pdclib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merged PDPCLIB and Therx code.
[fw/pdclib]
/
functions
/
math
/
cbrt.c
diff --git
a/functions/math/cbrt.c
b/functions/math/cbrt.c
index cf6d16b8a0376ed73c0fa06c8f7891dbb00a6017..86ef6906314ebf8cdac7f38ad747e2e1a90db5ce 100644
(file)
--- a/
functions/math/cbrt.c
+++ b/
functions/math/cbrt.c
@@
-15,5
+15,18
@@
long double cbrt( long double x ) { /* TODO */ };
// Standard C
double cbrt( 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 */ };
float cbrtf( float x ) { /* TODO */ };
long double cbrtl( long double x ) { /* TODO */ };