public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Letu Ren <fantasquex@gmail.com>
Cc: <libc-alpha@sourceware.org>, <fweimer@redhat.com>
Subject: Re: [PATCH] stdlib/strfrom: Add copysign to fix NAN issue on riscv (BZ #29501)
Date: Wed, 5 Oct 2022 16:00:55 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2210051558520.917581@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20221005111353.3921-1-fantasquex@gmail.com>

On Wed, 5 Oct 2022, Letu Ren via Libc-alpha wrote:

> Since glibc ought to be consistent here between types and architectures, this
> patch adds copysign to fix this problem if the string is NAN. This patch
> leverge Macro instead of creating a function under sysdeps directory
> because there is only one place which needs a keep-sign conversion.

We avoid architecture-specific conditionals in architecture-independent 
code as far as possible.  The way to handle this kind of thing is a 
sysdeps header containing an inline function to convert from float to 
double while preserving NaN signs.

-- 
Joseph S. Myers
joseph@codesourcery.com

      reply	other threads:[~2022-10-05 16:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 11:13 Letu Ren
2022-10-05 16:00 ` Joseph Myers [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=alpine.DEB.2.22.394.2210051558520.917581@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=fantasquex@gmail.com \
    --cc=fweimer@redhat.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).