From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: [PATCH 1/2] Avoid implicit floating point conversions [v2]
Date: Tue, 25 Aug 2020 13:10:09 +0200 [thread overview]
Message-ID: <20200825111009.GI3272@calimero.vinschen.de> (raw)
In-Reply-To: <87r1rwf47t.fsf@keithp.com>
On Aug 24 08:33, Keith Packard via Newlib wrote:
> Corinna Vinschen via Newlib <newlib@sourceware.org> writes:
>
> > Not taking implicit compiler optimisations into account, wouldn't it
> > make more sense to avoid the conversion altogether, using
> > __builtin_inf() in these places?
>
> Yeah, could do that instead. I think it's mostly a matter of what looks
> better -- using the "standard" value of INFINITY and casting or using a
> compiler internal value without. I think it'll confuse an equal number
> of people either way.
>
> Any preferences?
__builtin_inf(), or a sufficiently expressive macro. It's pretty
unfortunate that POSIX defines INFINITY and NAN as float, rather than
providing type-matching macros as in HUGE_VALF - HUGE_VAL - HUGE_VALL.
Something like #define _INF (__builtin_inf()) comes to mind.
Corinna
next prev parent reply other threads:[~2020-08-25 11:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-21 0:35 [PATCH 0/2] Floating point conversion warning fixes [v2] Keith Packard
2020-08-21 0:35 ` [PATCH 1/2] Avoid implicit floating point conversions [v2] Keith Packard
2020-08-24 9:58 ` Corinna Vinschen
2020-08-24 15:33 ` Keith Packard
2020-08-25 11:10 ` Corinna Vinschen [this message]
2020-08-25 13:37 ` Thomas Wucher
2020-08-21 0:35 ` [PATCH 2/2] libm/common: Remove unused 'dec' function from sqrtl.c Keith Packard
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=20200825111009.GI3272@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=newlib@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).