public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/28502] New: Accuracy claim for complex functions
@ 2021-10-26 22:35 mwelinder at gmail dot com
2021-10-27 0:05 ` [Bug manual/28502] " joseph at codesourcery dot com
2021-10-27 0:08 ` joseph at codesourcery dot com
0 siblings, 2 replies; 3+ messages in thread
From: mwelinder at gmail dot com @ 2021-10-26 22:35 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28502
Bug ID: 28502
Summary: Accuracy claim for complex functions
Product: glibc
Version: 2.31
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: manual
Assignee: unassigned at sourceware dot org
Reporter: mwelinder at gmail dot com
CC: mtk.manpages at gmail dot com
Target Milestone: ---
See math.texi, "Errors in Math Functions".
@item
Each function with a floating-point result behaves as if it computes
an infinite-precision result that is within a few ulp (in both real
and complex parts, for functions with complex results) of the
mathematically correct value of the function[...]
This would be quite stellar performance for complex functions, if true. It is
not true. Bug 14473 has a few examples, notably
I^(2+I) --> -0.20788 + 2.54571e-17 I
in which the imaginary part -- which should be 0 -- is off by 2^60ulp or
something like that.
I bring it up here as a documentation bug because I think the per-coordinate
accuracy goal is the wrong target for a function like cpow. It's a non-trivial
topic, but something involving the complex absolute value of the difference
between the theoretical and observed results compared to the absolute value of
the theoretical result seems right.
A no-error guarantee for creal, cimag, and conj would make sense too.
Note that the table of known errors (as seen at the bottom of
https://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-Functions.html)
claims a few ulp for cpow which is way off. Bug 14473 also has the example
I^(2^53+I) --> 0.177058 + -0.108924 i
which is off by something like 2^52ulp in the real part.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug manual/28502] Accuracy claim for complex functions
2021-10-26 22:35 [Bug manual/28502] New: Accuracy claim for complex functions mwelinder at gmail dot com
@ 2021-10-27 0:05 ` joseph at codesourcery dot com
2021-10-27 0:08 ` joseph at codesourcery dot com
1 sibling, 0 replies; 3+ messages in thread
From: joseph at codesourcery dot com @ 2021-10-27 0:05 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28502
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
The documentation says:
Instead, the goals for
accuracy of functions without fully specified results are as follows;
some functions have bugs meaning they do not meet these goals in all
cases.
The "some functions have bugs ..." is intended to cover cases such as cpow
and jn.
Also, the table is explicitly only for errors covered by the existing
tests in the testsuite.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug manual/28502] Accuracy claim for complex functions
2021-10-26 22:35 [Bug manual/28502] New: Accuracy claim for complex functions mwelinder at gmail dot com
2021-10-27 0:05 ` [Bug manual/28502] " joseph at codesourcery dot com
@ 2021-10-27 0:08 ` joseph at codesourcery dot com
1 sibling, 0 replies; 3+ messages in thread
From: joseph at codesourcery dot com @ 2021-10-27 0:08 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=28502
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
creal, cimag and conj are covered by the "Except for certain functions
such as @code{sqrt}, @code{fma} and @code{rint} whose results are fully
specified by reference to corresponding IEEE 754 floating-point
operations, and conversions between strings and floating point" text.
(For the exact list of covered functions, look at which functions have 1
as the second argument to ALL_RM_TEST in their tests.)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-27 0:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 22:35 [Bug manual/28502] New: Accuracy claim for complex functions mwelinder at gmail dot com
2021-10-27 0:05 ` [Bug manual/28502] " joseph at codesourcery dot com
2021-10-27 0:08 ` joseph at codesourcery dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).