public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Paul A. Clarke" <pc@us.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Michael Meissner <meissner@linux.ibm.com>,
	Bill Schmidt <wschmidt@linux.ibm.com>,
	gcc-patches@gcc.gnu.org, David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] PowerPC Fix ibm128 defaults for pr70117.c test.
Date: Wed, 18 Nov 2020 19:13:04 -0600	[thread overview]
Message-ID: <20201119011304.GA30097@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com> (raw)
In-Reply-To: <20201118222909.GR2672@gate.crashing.org>

On Wed, Nov 18, 2020 at 04:29:09PM -0600, Segher Boessenkool wrote:
> On Wed, Nov 18, 2020 at 10:53:49PM +0100, Jakub Jelinek wrote:
> > On Wed, Nov 18, 2020 at 03:43:20PM -0600, Segher Boessenkool wrote:
> > > On Sun, Nov 15, 2020 at 12:17:47PM -0500, Michael Meissner wrote:
> > > > --- a/gcc/testsuite/gcc.target/powerpc/pr70117.c
> > > > +++ b/gcc/testsuite/gcc.target/powerpc/pr70117.c
> > > > @@ -9,9 +9,11 @@
> > > >     128-bit floating point, because the type is not enabled on those
> > > >     systems.  */
> > > >  #define LDOUBLE __ibm128
> > > > +#define IBM128_MAX ((__ibm128) 1.79769313486231580793728971405301199e+308L)
> > > 
> > > This is the IEEE QP float number 43fefffffffffffff7ffffffffffff80 which
> > > I very much doubt is the maximum finite double-double?  See the 0 in the
> > 
> > Numbers without the 0 in the middle-end aren't valid, see
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95450#c6
> > for more details.  Without the 0 in the middle the double double number
> > rounded to double would require increasing the higher double, and as it is
> > the largest representable finite number, that is not possible.
> 
> Ah, in that way.  Tricky.
> 
> Mike, please add a comment, what number it represents?  Okay for trunk
> with that, thanks.
> 
> (Should those not be define in some header though?)

Would it be better to represent the number in hex, like with printf's '%a'
formatting (e.g. "0x1.921fb54442d18p+0"...this is NOT the same value)?

(I always get nervous when I see a long float hardcoded in decimal.)

PC

  reply	other threads:[~2020-11-19  1:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 17:17 Michael Meissner
2020-11-18  5:34 ` will schmidt
2020-11-18 21:43 ` Segher Boessenkool
2020-11-18 21:53   ` Jakub Jelinek
2020-11-18 22:29     ` Segher Boessenkool
2020-11-19  1:13       ` Paul A. Clarke [this message]
2020-11-19 14:08         ` Segher Boessenkool
2020-11-19  8:08       ` Michael Meissner
2020-11-19 14:03         ` Segher Boessenkool
2020-11-21  5:27           ` Michael Meissner
2020-11-23 18:59             ` Segher Boessenkool
2020-11-23 19:10               ` Jakub Jelinek
2020-11-23 20:13                 ` Segher Boessenkool

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=20201119011304.GA30097@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com \
    --to=pc@us.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=meissner@linux.ibm.com \
    --cc=segher@kernel.crashing.org \
    --cc=wschmidt@linux.ibm.com \
    /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).