public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: libc-alpha@sourceware.org
Cc: joseph@codesourcery.com, carlos@redhat.com, fweimer@redhat.com
Subject: [PATCH 1/5] x86 long double: Support pseudo numbers in fpclassifyl
Date: Tue, 15 Dec 2020 19:43:35 +0530	[thread overview]
Message-ID: <20201215141339.2684384-2-siddhesh@sourceware.org> (raw)
In-Reply-To: <20201215141339.2684384-1-siddhesh@sourceware.org>

---
 sysdeps/i386/fpu/s_fpclassifyl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sysdeps/i386/fpu/s_fpclassifyl.c b/sysdeps/i386/fpu/s_fpclassifyl.c
index 501312f51e..aeaec7279c 100644
--- a/sysdeps/i386/fpu/s_fpclassifyl.c
+++ b/sysdeps/i386/fpu/s_fpclassifyl.c
@@ -34,6 +34,10 @@ __fpclassifyl (long double x)
     retval = FP_ZERO;
   else if (ex == 0 && (hx & 0x80000000) == 0)
     retval = FP_SUBNORMAL;
+  /* Pseudo-normals, i.e. pseudo-zero, pseudo-infinity and unnormals.  They
+     behave like NaNs, so categorize them as such.  */
+  else if ((hx & 0x80000000) == 0)
+    retval = FP_NAN;
   else if (ex == 0x7fff)
     retval = ((hx & 0x7fffffff) | lx) != 0 ? FP_NAN : FP_INFINITE;
 
-- 
2.29.2


  reply	other threads:[~2020-12-15 14:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 14:13 [PATCH 0/5] x86 pseudo-normal numbers Siddhesh Poyarekar
2020-12-15 14:13 ` Siddhesh Poyarekar [this message]
2020-12-22 18:43   ` [PATCH 1/5] x86 long double: Support pseudo numbers in fpclassifyl Adhemerval Zanella
2020-12-23  1:43     ` Siddhesh Poyarekar
2020-12-15 14:13 ` [PATCH 2/5] x86 long double: Support pseudo numbers in isnanl Siddhesh Poyarekar
2020-12-22 19:04   ` Adhemerval Zanella
2020-12-23  1:49     ` Siddhesh Poyarekar
2020-12-23  8:34       ` Siddhesh Poyarekar
2020-12-15 14:13 ` [PATCH 3/5] Partially revert 681900d29683722b1cb0a8e565a0585846ec5a61 Siddhesh Poyarekar
2020-12-15 14:36   ` Florian Weimer
2020-12-15 15:01     ` Siddhesh Poyarekar
2020-12-15 14:13 ` [PATCH 4/5] x86 long double: Consider pseudo numbers as signaling Siddhesh Poyarekar
2020-12-22 20:13   ` Adhemerval Zanella
2020-12-23  1:50     ` Siddhesh Poyarekar
2020-12-15 14:13 ` [PATCH 5/5] x86 long double: Add tests for pseudo normal numbers Siddhesh Poyarekar
2020-12-22 21:48   ` Adhemerval Zanella
2020-12-23  1:58     ` Siddhesh Poyarekar
2020-12-23 10:20       ` Siddhesh Poyarekar
2020-12-23 17:44         ` Adhemerval Zanella
2020-12-24  0:48           ` Siddhesh Poyarekar
2020-12-15 18:26 ` [PATCH 0/5] x86 pseudo-normal numbers Joseph Myers
2020-12-15 18:29   ` Siddhesh Poyarekar
2020-12-18  4:03 ` [PING][PATCH " Siddhesh Poyarekar
2020-12-22  7:46 ` [PING*2][PATCH " Siddhesh Poyarekar
2020-12-22 11:11   ` Adhemerval Zanella

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=20201215141339.2684384-2-siddhesh@sourceware.org \
    --to=siddhesh@sourceware.org \
    --cc=carlos@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@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).