Date: Sat, 09 Feb 2019 00:09:37 +0000 From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 216864] cpow(), cpowf(), and cpowl() need better implementations Message-ID: <bug-216864-99-f7zdeIVILp@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-216864-99@https.bugs.freebsd.org/bugzilla/> References: <bug-216864-99@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216864 --- Comment #7 from Steve Kargl <kargl@FreeBSD.org> --- (In reply to Ed Maste from comment #6) > a. adding comments to those files referencing this PR (or > a similar PR for other functions) and pointing out that a > proper implementation is required It can't hurt, but I suspect that I'm the only person=20 besides bde that looks at the implementation details of the various libm functions. > b. adding a link-time warning (as emitted if using e.g. > gets) that the current implementation is poor quality To theraven@'s credit, he does have a link-time and/or run-time warning in imprecise.c. his code is /* * If long double is not the same size as double, then these will lose * precision and we should emit a warning whenever something links against * them. */ #if (LDBL_MANT_DIG > 53) #define WARN_IMPRECISE(x) \ __warn_references(x, # x " has lower than advertised precision"); #else #define WARN_IMPRECISE(x) #endif The message can probably be audited to state __warn_references(x, # x " needs a code review and tested"); and added to cpow[fl] and powl code. > Is this an accurate view of the current status: > > Some sort of work in progress: ccoshl ccosl cexpl csinhl csinl > Improved implementations needed: cpow cpowf cpowl powl tgammal > No current implementation: ctanhl ctanl ccoshl, ccosl, and cexpl are implemented. I need to do more testing, and the code needs review. I post codes to freebsd-numerics@ and=20 bde normal does a review. At the moment, I have the feeling that I am the only subscriber to that list. csinhl and csinl will be implemented this week. Review and testing will follow. I haven't looked at ctanh and ctan, so don't know the=20 difficulty in porting those to ld80 and ld128. tgammal is mapped by imprecises.c to tgamma, so at most 53-bit precision. cpow[fl] and powl use Cephes. These could use review and testing. I suspect that bde will not look at this code, and I probably will just work new implementations. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-216864-99-f7zdeIVILp>