public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/30066] New: Inaccurate asin computation.
@ 2023-02-01 13:35 kspalaiologos at gmail dot com
  0 siblings, 0 replies; only message in thread
From: kspalaiologos at gmail dot com @ 2023-02-01 13:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=30066

            Bug ID: 30066
           Summary: Inaccurate asin computation.
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: kspalaiologos at gmail dot com
  Target Milestone: ---

Consider the following code:

--
#include <stdio.h>
#include <math.h>

int main(void) {
    printf("%a\n", asin(sin(1.5)));
    printf("%a\n", acos(cos(1.5)));
    printf("%a\n", atan(tan(1.5)));
--

The output of it is slightly incorrect as follows:

--
0x1.8000000000001p+0
0x1.8p+0
0x1.8p+0
--

This issue seems to be dependent on the argument, since (for instance) as we
let x=0.6:

--
0x1.3333333333333p-1
0x1.3333333333333p-1
0x1.3333333333333p-1
--

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-01 13:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 13:35 [Bug math/30066] New: Inaccurate asin computation kspalaiologos at gmail 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).