public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Marek Polacek <polacek@redhat.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Implement -fsanitize=float-cast-overflow
Date: Thu, 15 May 2014 21:29:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1405152124440.911@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20140515190929.GQ10386@tucnak.redhat.com>

On Thu, 15 May 2014, Jakub Jelinek wrote:

> But I think we can't use decimal_real_from_string, we'd need a variant
> of that function that would allow specification of the rounding mode

My point is that you can use "%.*RUe" or "%.*RDe" formats (for max and min 
respectively), with an appropriate precision, and let MPFR do the rounding 
to an appropriate number of decimal digits in the right direction (to 
produce a value that's exactly representable in the relevant DFP type, as 
long as it's in range).

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2014-05-15 21:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 17:08 Marek Polacek
2014-05-13 17:38 ` Jakub Jelinek
2014-05-13 18:11 ` Joseph S. Myers
2014-05-14 11:38   ` Jakub Jelinek
2014-05-14 17:37     ` Joseph S. Myers
2014-05-15 19:09       ` Jakub Jelinek
2014-05-15 21:29         ` Joseph S. Myers [this message]
2014-05-16  7:37           ` Jakub Jelinek
2014-05-16 15:54             ` Joseph S. Myers
2014-05-20 20:33             ` [PATCH] Implement -fsanitize=float-cast-overflow (take 2) Marek Polacek
2014-05-20 21:50               ` Joseph S. Myers
2014-05-21 12:51                 ` Marek Polacek
2014-05-21 14:46                   ` Jakub Jelinek
2014-05-21 18:52                     ` Jakub Jelinek
2014-05-22  8:06                       ` [PATCH] Fix LTO decimal ICE Jakub Jelinek
2014-05-21 17:50                   ` [PATCH] Implement -fsanitize=float-cast-overflow (take 2) Joseph S. Myers

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=Pine.LNX.4.64.1405152124440.911@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=polacek@redhat.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).