public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libquadmath/114623] sqrtq and std::numeric_limits<__float128>::max()
Date: Tue, 09 Apr 2024 06:22:51 +0000	[thread overview]
Message-ID: <bug-114623-4-friEespLRB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114623-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114623

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:481ba4fb5fce8257f5dbeb994dac2748c0237fa2

commit r14-9853-g481ba4fb5fce8257f5dbeb994dac2748c0237fa2
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Apr 9 08:17:25 2024 +0200

    libquadmath: Use soft-fp for sqrtq finite positive arguments [PR114623]

    sqrt should be 0.5ulp precise, but the current implementation is less
    precise than that.
    The following patch uses the soft-fp code (like e.g. glibc for x86) for it
    if possible.  I didn't want to replicate the libgcc infrastructure for
    choosing the right sfp-machine.h, so the patch just uses a single generic
    implementation.  As the code is used solely for the finite positive
arguments,
    it shouldn't generate NaNs (so the exact form of canonical QNaN/SNaN is
    irrelevant), and sqrt for these shouldn't produce underflows/overflows
either,
    for < 1.0 arguments it always returns larger values than the argument and
for
    > 1.0 smaller values than the argument.

    2024-04-09  Jakub Jelinek  <jakub@redhat.com>

            PR libquadmath/114623
            * sfp-machine.h: New file.
            * math/sqrtq.c: Include from libgcc/soft-fp also soft-fp.h and
quad.h
            if possible.
            (USE_SOFT_FP): Define in that case.
            (sqrtq): Use soft-fp based implementation for the finite positive
            arguments if possible.

      parent reply	other threads:[~2024-04-09  6:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07  4:03 [Bug libquadmath/114623] New: sqrt g.peterhoff@t-online.de
2024-04-07  4:15 ` [Bug libquadmath/114623] sqrt pinskia at gcc dot gnu.org
2024-04-07  4:22 ` [Bug libquadmath/114623] sqrtq and std::numeric_limits<__float128>::max() g.peterhoff@t-online.de
2024-04-07  4:41 ` pinskia at gcc dot gnu.org
2024-04-07  5:20 ` g.peterhoff@t-online.de
2024-04-08  8:42 ` jakub at gcc dot gnu.org
2024-04-08 11:27 ` jakub at gcc dot gnu.org
2024-04-08 11:30 ` jakub at gcc dot gnu.org
2024-04-09  6:22 ` cvs-commit at gcc dot gnu.org [this message]

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-114623-4-friEespLRB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).