[Bug 216864] cpow(), cpowf(), and cpowl() need better implementations
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Feb 9 00:09:40 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216864
--- Comment #7 from Steve Kargl <kargl at 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
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
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
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.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-standards
mailing list