[libm] Correct comments in s_cbrt[l].c

Damian McGuckin <damianm at esi dot com dot au> noted that the accuracy
claims in the code for cbrt(3) and cbrtl(3) were incorrect. Fix the
comments to more accurately describe the accuracies.

PR:		265603
MFC after:	3 days
This commit is contained in:
Steve Kargl 2022-08-04 19:31:57 +02:00 committed by Dimitry Andric
parent 3c4f8adc79
commit 369ea0520a
2 changed files with 2 additions and 2 deletions

View file

@ -108,7 +108,7 @@ cbrt(double x)
r=x/s; /* error <= 0.5 ulps; |r| < |t| */
w=t+t; /* t+t is exact */
r=(r-t)/(w+r); /* r-t is exact; w+r ~= 3*t */
t=t+t*r; /* error <= 0.5 + 0.5/3 + epsilon */
t=t+t*r; /* error <= (0.5 + 0.5/3) * ulp */
return(t);
}

View file

@ -136,7 +136,7 @@ cbrtl(long double x)
r=x/s; /* error <= 0.5 ulps; |r| < |t| */
w=t+t; /* t+t is exact */
r=(r-t)/(w+r); /* r-t is exact; w+r ~= 3*t */
t=t+t*r; /* error <= 0.5 + 0.5/3 + epsilon */
t=t+t*r; /* error <= (0.5 + 0.5/3) * ulp */
t *= v.e;
RETURNI(t);