public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/31104] New: Sign inconsistencies with various log functions
@ 2023-11-30 23:54 mwelinder at gmail dot com
  2023-12-01  7:59 ` [Bug math/31104] " schwab@linux-m68k.org
  0 siblings, 1 reply; 2+ messages in thread
From: mwelinder at gmail dot com @ 2023-11-30 23:54 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 31104
           Summary: Sign inconsistencies with various log functions
           Product: glibc
           Version: 2.35
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: mwelinder at gmail dot com
  Target Milestone: ---

printf ("%+.12g %+.12g %+.12g %+.12g\n", log (-42), log2 (-42), log10 (-42),
log1p (-43));
  printf ("%+.12g %+.12g %+.12g %+.12g\n", logf (-42), log2f (-42), log10f
(-42), log1pf (-43));
  printf ("%+.12Lg %+.12Lg %+.12Lg %+.12Lg\n", logl (-42), log2l (-42), log10l
(-42), log1pl (-43));


gives me...

-nan -nan +nan -nan
-nan -nan +nan -nan
+nan +nan +nan -nan

That's just all over the place!

That sign inconsistency seems silly, even if the standards might allow it.



GNU C Library (Ubuntu GLIBC 2.35-0ubuntu3.4) stable release version 2.35.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug math/31104] Sign inconsistencies with various log functions
  2023-11-30 23:54 [Bug math/31104] New: Sign inconsistencies with various log functions mwelinder at gmail dot com
@ 2023-12-01  7:59 ` schwab@linux-m68k.org
  0 siblings, 0 replies; 2+ messages in thread
From: schwab@linux-m68k.org @ 2023-12-01  7:59 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
The sign of NaN is irrelevant, so there is nothing wrong with this.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-01  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-30 23:54 [Bug math/31104] New: Sign inconsistencies with various log functions mwelinder at gmail dot com
2023-12-01  7:59 ` [Bug math/31104] " schwab@linux-m68k.org

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