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

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).