public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Paul Zimmermann <Paul.Zimmermann@inria.fr>
To: newlib@sourceware.org
Cc: vincenzo.innocente@cern.ch
Subject: huge error for pow
Date: Tue, 07 Feb 2023 15:27:42 +0100	[thread overview]
Message-ID: <mwa61p7dpd.fsf@coriandre.loria.fr> (raw)

       Hi,

while testing Newlib 4.3.0, I noticed the following huge error:

zimmerma@salade:~/svn/tbd/20/src/binary64$ VERBOSE=-v ./doitb.newlib pow 1000
Checking pow with newlib-4.3.0.20230120
Using seed 1619945
pow 0 -1 -0x1.647ff80007ff8p-576,-0x1.3d018267f12fp+48 [inf] inf inf
libm gives inf
mpfr gives -inf

The exponent y in x^y is a large odd integer, thus since x is negative we
should get a negative number as result.

This issue was apparently already present in 3.3.0, but we only discovered
it now.

Best regards,
Paul



             reply	other threads:[~2023-02-07 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 14:27 Paul Zimmermann [this message]
2023-02-07 21:48 ` Jeff Johnston
2023-02-08  7:02   ` Paul Zimmermann
2023-04-08  6:00 Paul Zimmermann
2023-04-11  9:18 ` Corinna Vinschen
2023-04-11  9:37   ` Paul Zimmermann

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=mwa61p7dpd.fsf@coriandre.loria.fr \
    --to=paul.zimmermann@inria.fr \
    --cc=newlib@sourceware.org \
    --cc=vincenzo.innocente@cern.ch \
    /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).