public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: FX <fxcoudert@gmail.com>
To: Mikael Morin <morin-mikael@orange.fr>
Cc: Fortran <fortran@gcc.gnu.org>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fortran 2018 rounding modes changes
Date: Mon, 19 Sep 2022 18:17:09 +0200	[thread overview]
Message-ID: <52A7FAB8-735E-42D8-97A6-7E4C4F108C5E@gmail.com> (raw)
In-Reply-To: <b865be63-746e-2519-d3e6-b6827cb0ec2f@orange.fr>

Hi,

>> 2. Add the optional RADIX argument to IEEE_SET_ROUNDING_MODE and IEEE_GET_ROUNDING_MODE. It is unused for now, because we do not support floating-point radices other than 2.
> If we accept the argument, we have to support it somehow.
> So for IEEE_GET_ROUNDING_MODE (*, 10), we should return IEEE_OTHER, shouldn't we?

I think I disagree. We do not support any real kind with radix 10, so calling IEEE_GET_ROUNDING_MODE with RADIX=10 is invalid. Or, in another interpretation, the rounding mode is whatever-you-want-to-call it, since you cannot perform arithmetic in that radix anyway.


> There is no problem for IEEE_SET_ROUNDING_MODE (*, 10) as there is no way this to be a valid call if radix 10 is not supported, but changing a compile time error to a runtime unexpected behavior seems like a step backwards.

What do you mean by that? The behavior is not unexpected, the value returned by IEEE_GET_ROUNDING_MODE for RADIX=10 is irrelevant and cannot be used for anything useful.

FX

  reply	other threads:[~2022-09-19 16:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 18:29 FX
2022-08-31 20:42 ` Bernhard Reutner-Fischer
2022-08-31 21:23   ` FX
2022-09-10 10:21 ` FX
2022-09-19 12:26   ` FX
2022-09-19 15:35 ` Mikael Morin
2022-09-19 16:17   ` FX [this message]
2022-09-19 17:09     ` Mikael Morin
2022-09-19 17:29       ` FX
2022-09-21  9:15         ` FX

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=52A7FAB8-735E-42D8-97A6-7E4C4F108C5E@gmail.com \
    --to=fxcoudert@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=morin-mikael@orange.fr \
    /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).