that returns the cube root of a floating point number.
Put it on a file named "cubrt.c"; compile and test it,
(If you don't know how to compute cube roots, try Newton's method).
if (a==0. && b==0.) return(0.);
if (reldif(cubrt(a), b) > eps)
if (reldif(cubrt(a), b) > eps)
if (reldif(cubrt(a), b) > eps)
cc tzaqc.c cubrt.o reldif.c
/* Newton's method: x <- x - (x**3-a)/(3*x*x) */
while (dabs(y-yn) > y*1.e-8) {
yn = y - (y*y*y-x)/(3*y*y);