public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mwelinder at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug math/31104] New: Sign inconsistencies with various log functions
Date: Thu, 30 Nov 2023 23:54:51 +0000	[thread overview]
Message-ID: <bug-31104-131@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2023-11-30 23:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 23:54 mwelinder at gmail dot com [this message]
2023-12-01  7:59 ` [Bug math/31104] " schwab@linux-m68k.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31104-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).