Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The world is coming to an end. Please log off.


devel / comp.lang.fortran / Re: Question about IEEE_MAX_NUM_MAG

SubjectAuthor
* Question about IEEE_MAX_NUM_MAGFX Coudert
+* Re: Question about IEEE_MAX_NUM_MAGPeter Klausler US
|`- Re: Question about IEEE_MAX_NUM_MAGFX Coudert
`* Re: Question about IEEE_MAX_NUM_MAGSteve Lionel
 `* Re: Question about IEEE_MAX_NUM_MAGPeter Klausler US
  `- Re: Question about IEEE_MAX_NUM_MAGSteve Lionel

1
Question about IEEE_MAX_NUM_MAG

<b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3427&group=comp.lang.fortran#3427

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:198f:b0:75b:2f5a:172d with SMTP id bm15-20020a05620a198f00b0075b2f5a172dmr324800qkb.14.1686049694810;
Tue, 06 Jun 2023 04:08:14 -0700 (PDT)
X-Received: by 2002:a05:622a:20a:b0:3f9:ac4d:272d with SMTP id
b10-20020a05622a020a00b003f9ac4d272dmr437257qtx.5.1686049694554; Tue, 06 Jun
2023 04:08:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Tue, 6 Jun 2023 04:08:14 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=193.51.253.127; posting-account=mNvHVgoAAADwOwyQ7XwaYlS-S3etLTVv
NNTP-Posting-Host: 193.51.253.127
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com>
Subject: Question about IEEE_MAX_NUM_MAG
From: fxcoudert@gmail.com (FX Coudert)
Injection-Date: Tue, 06 Jun 2023 11:08:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: FX Coudert - Tue, 6 Jun 2023 11:08 UTC

Hi,

I am trying to figure out how IEEE_MAX_NUM_MAG (and IEEE_MIN_NUM_MAG, IEEE_MAX_NUM, IEEE_MIN_NUM) are supposed to behave when both arguments are zeros with different signs.

From what I read in the text of the 2018 standard, we are in the case where "the result is either X or Y (processor dependent)". On the other hand, the Fortran standard refers to the IEEE operations, but those do not have processor-dependent behavior. Moreover, they have now been deprecated in more recent standards.

Is there any interpretation on the topic? I am missing something? Can someone give me an idea what compilers give for IEEE_MAX_NUM_MAG(-0., 0.) and IEEE_MAX_NUM_MAG(0., -0.) and IEEE_MAX_NUM_MAG(-0., -0.)?

Thanks,
FX

Re: Question about IEEE_MAX_NUM_MAG

<f76e81b2-0af3-4c74-ad21-831d81e90039n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3428&group=comp.lang.fortran#3428

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:1907:b0:5ef:5726:ba25 with SMTP id er7-20020a056214190700b005ef5726ba25mr240065qvb.0.1686060780354;
Tue, 06 Jun 2023 07:13:00 -0700 (PDT)
X-Received: by 2002:a05:620a:1725:b0:75e:d82c:1824 with SMTP id
az37-20020a05620a172500b0075ed82c1824mr243016qkb.2.1686060780122; Tue, 06 Jun
2023 07:13:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Tue, 6 Jun 2023 07:12:59 -0700 (PDT)
In-Reply-To: <b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=12.154.207.45; posting-account=ZT-cAwoAAACx2tBPXm-WZoHIT8sjnGGy
NNTP-Posting-Host: 12.154.207.45
References: <b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f76e81b2-0af3-4c74-ad21-831d81e90039n@googlegroups.com>
Subject: Re: Question about IEEE_MAX_NUM_MAG
From: pklausler@nvidia.com (Peter Klausler US)
Injection-Date: Tue, 06 Jun 2023 14:13:00 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Peter Klausler US - Tue, 6 Jun 2023 14:12 UTC

On Tuesday, June 6, 2023 at 4:08:16 AM UTC-7, FX Coudert wrote:
> Hi,
>
> I am trying to figure out how IEEE_MAX_NUM_MAG (and IEEE_MIN_NUM_MAG, IEEE_MAX_NUM, IEEE_MIN_NUM) are supposed to behave when both arguments are zeros with different signs.
>
> From what I read in the text of the 2018 standard, we are in the case where "the result is either X or Y (processor dependent)". On the other hand, the Fortran standard refers to the IEEE operations, but those do not have processor-dependent behavior. Moreover, they have now been deprecated in more recent standards.
>
> Is there any interpretation on the topic? I am missing something? Can someone give me an idea what compilers give for IEEE_MAX_NUM_MAG(-0., 0.) and IEEE_MAX_NUM_MAG(0., -0.) and IEEE_MAX_NUM_MAG(-0., -0.)?
>
> Thanks,
> FX

Of all the various Fortran compilers to which I have access, only ifort/ifx support these four functions, and they return the second operand as their result when both operands are zero.

Re: Question about IEEE_MAX_NUM_MAG

<ke8to8F51onU1@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3429&group=comp.lang.fortran#3429

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: steve@seesignature.invalid (Steve Lionel)
Newsgroups: comp.lang.fortran
Subject: Re: Question about IEEE_MAX_NUM_MAG
Date: Tue, 6 Jun 2023 10:22:00 -0400
Lines: 21
Message-ID: <ke8to8F51onU1@mid.individual.net>
References: <b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 7/7vMOGMuVBdSVESXQleYwVSczuL2mCkDC0/UmPbNi8QKXpoMZ
Cancel-Lock: sha1:xij4OCT/fdYE7Y6LyGOxf9J/q6M=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.2
Content-Language: en-US
In-Reply-To: <b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com>
 by: Steve Lionel - Tue, 6 Jun 2023 14:22 UTC

On 6/6/2023 7:08 AM, FX Coudert wrote:
> I am trying to figure out how IEEE_MAX_NUM_MAG (and IEEE_MIN_NUM_MAG, IEEE_MAX_NUM, IEEE_MIN_NUM) are supposed to behave when both arguments are zeros with different signs.
>
> From what I read in the text of the 2018 standard, we are in the case where "the result is either X or Y (processor dependent)". On the other hand, the Fortran standard refers to the IEEE operations, but those do not have processor-dependent behavior. Moreover, they have now been deprecated in more recent standards.

The upcoming Fortran 2023 revises the descriptions of these functions,
removing the processor-dependent aspects and updating the revision of
ISO/IEC 60559 used to the 2020 edition. See
https://j3-fortran.org/doc/year/21/21-122r1.txt and
https://j3-fortran.org/doc/year/23/23-007.pdf

--
Steve Lionel
ISO/IEC JTC1/SC22/WG5 (Fortran) Convenor
Retired Intel Fortran developer/support
Email: firstname at firstnamelastname dot com
Twitter: @DoctorFortran
LinkedIn: https://www.linkedin.com/in/stevelionel
Blog: https://stevelionel.com/drfortran
WG5: https://wg5-fortran.org

Re: Question about IEEE_MAX_NUM_MAG

<babe59a9-eb1b-4fbc-b1ce-557f13664addn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3430&group=comp.lang.fortran#3430

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:4542:b0:75e:cc54:7d73 with SMTP id u2-20020a05620a454200b0075ecc547d73mr502879qkp.2.1686062483702;
Tue, 06 Jun 2023 07:41:23 -0700 (PDT)
X-Received: by 2002:a05:6214:9d4:b0:626:2a0f:f39d with SMTP id
dp20-20020a05621409d400b006262a0ff39dmr289322qvb.9.1686062483480; Tue, 06 Jun
2023 07:41:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!newsfeed.hasname.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Tue, 6 Jun 2023 07:41:23 -0700 (PDT)
In-Reply-To: <ke8to8F51onU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=12.154.207.45; posting-account=ZT-cAwoAAACx2tBPXm-WZoHIT8sjnGGy
NNTP-Posting-Host: 12.154.207.45
References: <b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com> <ke8to8F51onU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <babe59a9-eb1b-4fbc-b1ce-557f13664addn@googlegroups.com>
Subject: Re: Question about IEEE_MAX_NUM_MAG
From: pklausler@nvidia.com (Peter Klausler US)
Injection-Date: Tue, 06 Jun 2023 14:41:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2798
 by: Peter Klausler US - Tue, 6 Jun 2023 14:41 UTC

On Tuesday, June 6, 2023 at 7:22:05 AM UTC-7, Steve Lionel wrote:
> On 6/6/2023 7:08 AM, FX Coudert wrote:
> > I am trying to figure out how IEEE_MAX_NUM_MAG (and IEEE_MIN_NUM_MAG, IEEE_MAX_NUM, IEEE_MIN_NUM) are supposed to behave when both arguments are zeros with different signs.
> >
> > From what I read in the text of the 2018 standard, we are in the case where "the result is either X or Y (processor dependent)". On the other hand, the Fortran standard refers to the IEEE operations, but those do not have processor-dependent behavior. Moreover, they have now been deprecated in more recent standards.
> The upcoming Fortran 2023 revises the descriptions of these functions,
> removing the processor-dependent aspects and updating the revision of
> ISO/IEC 60559 used to the 2020 edition. See
> https://j3-fortran.org/doc/year/21/21-122r1.txt and
> https://j3-fortran.org/doc/year/23/23-007.pdf
>
> --
> Steve Lionel
> ISO/IEC JTC1/SC22/WG5 (Fortran) Convenor
> Retired Intel Fortran developer/support
> Email: firstname at firstnamelastname dot com
> Twitter: @DoctorFortran
> LinkedIn: https://www.linkedin.com/in/stevelionel
> Blog: https://stevelionel.com/drfortran
> WG5: https://wg5-fortran.org

Amusingly enough, this tweak in F'202X may drop the number of conforming compiler vendors from one down to zero.

The situation with signed zeroes and intrinsic MAX/MIN is also a portability problem; see https://github.com/klausler/fortran-wringer-tests/blob/main/signed-zero-max-min.f90

Re: Question about IEEE_MAX_NUM_MAG

<ke92o7F51onU2@mid.individual.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3431&group=comp.lang.fortran#3431

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: steve@seesignature.invalid (Steve Lionel)
Newsgroups: comp.lang.fortran
Subject: Re: Question about IEEE_MAX_NUM_MAG
Date: Tue, 6 Jun 2023 11:47:19 -0400
Lines: 17
Message-ID: <ke92o7F51onU2@mid.individual.net>
References: <b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com>
<ke8to8F51onU1@mid.individual.net>
<babe59a9-eb1b-4fbc-b1ce-557f13664addn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net yh6vYCR+xj6FD6EDrrtJhwMKUHMMED24bp+6fSXrS8Ac2KGRYW
Cancel-Lock: sha1:Mr1eRvKbEve/T1HZ1jIxOatK8Hw=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.11.2
Content-Language: en-US
In-Reply-To: <babe59a9-eb1b-4fbc-b1ce-557f13664addn@googlegroups.com>
 by: Steve Lionel - Tue, 6 Jun 2023 15:47 UTC

On 6/6/2023 10:41 AM, Peter Klausler US wrote:
> Amusingly enough, this tweak in F'202X may drop the number of conforming compiler vendors from one down to zero.

Thanks for noting that. I have created a test case and will send the
report to Intel. They could change the behavior now and still conform to
F2018, as well as F2023. Note that ifort/ifx needs you to specify
-assume minus0 for this case (without that, it does not conform to F2018.)
--
Steve Lionel
ISO/IEC JTC1/SC22/WG5 (Fortran) Convenor
Retired Intel Fortran developer/support
Email: firstname at firstnamelastname dot com
Twitter: @DoctorFortran
LinkedIn: https://www.linkedin.com/in/stevelionel
Blog: https://stevelionel.com/drfortran
WG5: https://wg5-fortran.org

Re: Question about IEEE_MAX_NUM_MAG

<84ea140d-f134-4d22-afbe-4ff41f8f86fbn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=3432&group=comp.lang.fortran#3432

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:176f:b0:626:1617:bbdf with SMTP id et15-20020a056214176f00b006261617bbdfmr731324qvb.1.1686413925830;
Sat, 10 Jun 2023 09:18:45 -0700 (PDT)
X-Received: by 2002:a37:9a12:0:b0:75a:1d5b:8678 with SMTP id
c18-20020a379a12000000b0075a1d5b8678mr328269qke.0.1686413925586; Sat, 10 Jun
2023 09:18:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 10 Jun 2023 09:18:45 -0700 (PDT)
In-Reply-To: <f76e81b2-0af3-4c74-ad21-831d81e90039n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=208.103.177.80; posting-account=mNvHVgoAAADwOwyQ7XwaYlS-S3etLTVv
NNTP-Posting-Host: 208.103.177.80
References: <b612cd4b-a537-4e6c-bdc5-d6db61c4b77an@googlegroups.com> <f76e81b2-0af3-4c74-ad21-831d81e90039n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <84ea140d-f134-4d22-afbe-4ff41f8f86fbn@googlegroups.com>
Subject: Re: Question about IEEE_MAX_NUM_MAG
From: fxcoudert@gmail.com (FX Coudert)
Injection-Date: Sat, 10 Jun 2023 16:18:45 +0000
Content-Type: text/plain; charset="UTF-8"
 by: FX Coudert - Sat, 10 Jun 2023 16:18 UTC

> Of all the various Fortran compilers to which I have access, only ifort/ifx support these four functions, and they return the second operand as their result when both operands are zero.

Thank you for your comments.
As of today, the development version of GCC/gfortran has them too. The implementation is not, at this stage, conformant to the future F'202X.

FX

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor