Date: Thu, 4 Aug 2022 17:34:34 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 369ea0520a30 - main - [libm] Correct comments in s_cbrt[l].c Message-ID: <202208041734.274HYYcP054912@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=369ea0520a3061c07400d7cd32172efb6af39815 commit 369ea0520a3061c07400d7cd32172efb6af39815 Author: Steve Kargl <kargl@FreeBSD.org> AuthorDate: 2022-08-04 17:31:57 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-08-04 17:33:34 +0000 [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 --- lib/msun/src/s_cbrt.c | 2 +- lib/msun/src/s_cbrtl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/src/s_cbrt.c b/lib/msun/src/s_cbrt.c index 0e609e110d9a..4353d340a1ac 100644 --- a/lib/msun/src/s_cbrt.c +++ b/lib/msun/src/s_cbrt.c @@ -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); } diff --git a/lib/msun/src/s_cbrtl.c b/lib/msun/src/s_cbrtl.c index 2236c0fa0348..b15c96ecde03 100644 --- a/lib/msun/src/s_cbrtl.c +++ b/lib/msun/src/s_cbrtl.c @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208041734.274HYYcP054912>