Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

< jaybonci> actually d-i stands for "divine intervention" ;) -- in #debian-devel


devel / comp.lang.fortran / Standardize real*8 as real(kind=real64)?

SubjectAuthor
* Standardize real*8 as real(kind=real64)?Beliavsky
+* Re: Standardize real*8 as real(kind=real64)?Beliavsky
|+* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
||`- Re: Standardize real*8 as real(kind=real64)?pehache
|+* Re: Standardize real*8 as real(kind=real64)?gah4
||`* Re: Standardize real*8 as real(kind=real64)?Beliavsky
|| `* Re: Standardize real*8 as real(kind=real64)?gah4
||  `- Re: Standardize real*8 as real(kind=real64)?Dick Hendrickson
|`- Re: Standardize real*8 as real(kind=real64)?John Collins
+- Re: Standardize real*8 as real(kind=real64)?FortranFan
+* Re: Standardize real*8 as real(kind=real64)?gah4
|+- Re: Standardize real*8 as real(kind=real64)?John Collins
|`* Re: Standardize real*8 as real(kind=real64)?Thomas Koenig
| `* Re: Standardize real*8 as real(kind=real64)?gah4
|  +* Re: Standardize real*8 as real(kind=real64)?Thomas Koenig
|  |`- Re: Standardize real*8 as real(kind=real64)?gah4
|  `- Re: Standardize real*8 as real(kind=real64)?Ron Shepard
+* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
|+- Re: Standardize real*8 as real(kind=real64)?Robin Vowels
|`* Re: Standardize real*8 as real(kind=real64)?pehache
| +* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| |`* Re: Standardize real*8 as real(kind=real64)?pehache
| | `* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| |  `- Re: Standardize real*8 as real(kind=real64)?pehache
| +* Re: Standardize real*8 as real(kind=real64)?pehache
| |`* Re: Standardize real*8 as real(kind=real64)?pehache
| | `* Re: Standardize real*8 as real(kind=real64)?Phillip Helbig (undress to reply
| |  +* Re: Standardize real*8 as real(kind=real64)?gah4
| |  |+* Re: Standardize real*8 as real(kind=real64)?jfh
| |  ||`* Re: Standardize real*8 as real(kind=real64)?FortranFan
| |  || `- Re: Standardize real*8 as real(kind=real64)?jfh
| |  |`- Re: Standardize real*8 as real(kind=real64)?Phillip Helbig (undress to reply
| |  `* Re: Standardize real*8 as real(kind=real64)?pehache
| |   `- Re: Standardize real*8 as real(kind=real64)?Phillip Helbig (undress to reply
| `* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
|  `* Re: Standardize real*8 as real(kind=real64)?pehache
|   `* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
|    +* Re: Standardize real*8 as real(kind=real64)?pehache
|    |`* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
|    | `* Re: Standardize real*8 as real(kind=real64)?pehache
|    |  +* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
|    |  |`- Re: Standardize real*8 as real(kind=real64)?pehache
|    |  `- Re: Standardize real*8 as real(kind=real64)?gah4
|    +* Re: Standardize real*8 as real(kind=real64)?gah4
|    |`- Re: Standardize real*8 as real(kind=real64)?Ron Shepard
|    `* Re: Standardize real*8 as real(kind=real64)?Quadibloc
|     `- Re: Standardize real*8 as real(kind=real64)?gah4
+* Re: Standardize real*8 as real(kind=real64)?John Collins
|+* Re: Standardize real*8 as real(kind=real64)?FortranFan
||`- Re: Standardize real*8 as real(kind=real64)?Robin Vowels
|`- Re: Standardize real*8 as real(kind=real64)?Robin Vowels
+* Re: Standardize real*8 as real(kind=real64)?JCampbell
|+* Re: Standardize real*8 as real(kind=real64)?Thomas Koenig
||+* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
|||`- Re: Standardize real*8 as real(kind=real64)?Robin Vowels
||`* Re: Standardize real*8 as real(kind=real64)?jfh
|| `* Re: Standardize real*8 as real(kind=real64)?JCampbell
||  `* Re: Standardize real*8 as real(kind=real64)?steve kargl
||   `* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
||    `* Re: Standardize real*8 as real(kind=real64)?steve kargl
||     `- Re: Standardize real*8 as real(kind=real64)?Quadibloc
|`* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| +* Re: Standardize real*8 as real(kind=real64)?John Collins
| |+* Re: Standardize real*8 as real(kind=real64)?gah4
| ||`* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
| || `* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| ||  `* Re: Standardize real*8 as real(kind=real64)?John Collins
| ||   +- Re: Standardize real*8 as real(kind=real64)?gah4
| ||   +* Re: Standardize real*8 as real(kind=real64)?FortranFan
| ||   |+- Re: Standardize real*8 as real(kind=real64)?gah4
| ||   |`* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| ||   | `- Re: Standardize real*8 as real(kind=real64)?FortranFan
| ||   +- Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| ||   `* Re: Standardize real*8 as real(kind=real64)?Quadibloc
| ||    `- Re: Standardize real*8 as real(kind=real64)?jfh
| |+* Re: Standardize real*8 as real(kind=real64)?steve kargl
| ||+* Re: Standardize real*8 as real(kind=real64)?Phillip Helbig (undress to reply
| |||`- Re: Standardize real*8 as real(kind=real64)?Ron Shepard
| ||+- Re: Standardize real*8 as real(kind=real64)?gah4
| ||+* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| |||`* Re: Standardize real*8 as real(kind=real64)?gah4
| ||| +- Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| ||| `* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
| |||  +- Re: Standardize real*8 as real(kind=real64)?gah4
| |||  `* Re: Standardize real*8 as real(kind=real64)?pehache
| |||   +* Re: Standardize real*8 as real(kind=real64)?gah4
| |||   |`- Re: Standardize real*8 as real(kind=real64)?Ron Shepard
| |||   `* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| |||    +* Re: Standardize real*8 as real(kind=real64)?pehache
| |||    |`* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| |||    | `* Re: Standardize real*8 as real(kind=real64)?pehache
| |||    |  `* Re: Standardize real*8 as real(kind=real64)?Ron Shepard
| |||    |   +* Re: Standardize real*8 as real(kind=real64)?pehache
| |||    |   |`- Re: Standardize real*8 as real(kind=real64)?Quadibloc
| |||    |   `- Re: Standardize real*8 as real(kind=real64)?Thomas Koenig
| |||    `- Re: Standardize real*8 as real(kind=real64)?Ron Shepard
| ||`* Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| || `- Re: Standardize real*8 as real(kind=real64)?steve kargl
| |`- Re: Standardize real*8 as real(kind=real64)?Robin Vowels
| `* Re: Standardize real*8 as real(kind=real64)?Quadibloc
|  `- Re: Standardize real*8 as real(kind=real64)?Thomas Koenig
+* Re: Standardize real*8 as real(kind=real64)?pehache
`* Re: Standardize real*8 as real(kind=real64)?gah4

Pages:12345
Standardize real*8 as real(kind=real64)?

<c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:f052:0:b0:443:db73:ea02 with SMTP id b18-20020a0cf052000000b00443db73ea02mr19906293qvl.22.1649513128422;
Sat, 09 Apr 2022 07:05:28 -0700 (PDT)
X-Received: by 2002:a25:824b:0:b0:635:2f1:c146 with SMTP id
d11-20020a25824b000000b0063502f1c146mr15962231ybn.143.1649513128271; Sat, 09
Apr 2022 07:05:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 9 Apr 2022 07:05:28 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=173.76.111.99; posting-account=Ac_J3QkAAABih73tf3Yz4sHazwGUM-hW
NNTP-Posting-Host: 173.76.111.99
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
Subject: Standardize real*8 as real(kind=real64)?
From: beliavsky@aol.com (Beliavsky)
Injection-Date: Sat, 09 Apr 2022 14:05:28 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: Beliavsky - Sat, 9 Apr 2022 14:05 UTC

Since compilers treat the non-standard but very common

real*4, real*8, integer*4, integer*8

as

use iso_fortran_env
real(kind=real32), real(kind=real64), integer(kind=int32), integer(kind=int64)

would it make sense to standardize the former set of declarations, which is concise and clear, to mean the same as the latter?

Re: Standardize real*8 as real(kind=real64)?

<b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:d42:b0:441:831b:fa1b with SMTP id 2-20020a0562140d4200b00441831bfa1bmr19502195qvr.130.1649515059743;
Sat, 09 Apr 2022 07:37:39 -0700 (PDT)
X-Received: by 2002:a25:4203:0:b0:641:39ff:c69f with SMTP id
p3-20020a254203000000b0064139ffc69fmr74671yba.498.1649515059546; Sat, 09 Apr
2022 07:37:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.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, 9 Apr 2022 07:37:39 -0700 (PDT)
In-Reply-To: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=173.76.111.99; posting-account=Ac_J3QkAAABih73tf3Yz4sHazwGUM-hW
NNTP-Posting-Host: 173.76.111.99
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: beliavsky@aol.com (Beliavsky)
Injection-Date: Sat, 09 Apr 2022 14:37:39 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Beliavsky - Sat, 9 Apr 2022 14:37 UTC

On Saturday, April 9, 2022 at 10:05:29 AM UTC-4, Beliavsky wrote:
> Since compilers treat the non-standard but very common
>
> real*4, real*8, integer*4, integer*8
>
> as
>
> use iso_fortran_env
> real(kind=real32), real(kind=real64), integer(kind=int32), integer(kind=int64)
>
> would it make sense to standardize the former set of declarations, which is concise and clear, to mean the same as the latter?

Currently, if someone inherits a code with real*8 and decides to make it standard-conforming, they may replace it with
real(kind=8), which is not guaranteed to work (failing with the NAG compiler for example). By standardizing real*8 appropriately this error is avoided.

Re: Standardize real*8 as real(kind=real64)?

<55eef73f-2f17-4872-a402-2f859c7fc4b2n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:8e0b:0:b0:435:1779:7b22 with SMTP id v11-20020a0c8e0b000000b0043517797b22mr20606609qvb.63.1649516138819;
Sat, 09 Apr 2022 07:55:38 -0700 (PDT)
X-Received: by 2002:a25:d507:0:b0:63d:a541:1a8c with SMTP id
r7-20020a25d507000000b0063da5411a8cmr17519982ybe.92.1649516138641; Sat, 09
Apr 2022 07:55:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.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, 9 Apr 2022 07:55:38 -0700 (PDT)
In-Reply-To: <b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com> <b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <55eef73f-2f17-4872-a402-2f859c7fc4b2n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Sat, 09 Apr 2022 14:55:38 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Robin Vowels - Sat, 9 Apr 2022 14:55 UTC

On Sunday, April 10, 2022 at 12:37:41 AM UTC+10, Beliavsky wrote:
> On Saturday, April 9, 2022 at 10:05:29 AM UTC-4, Beliavsky wrote:
> > Since compilers treat the non-standard but very common
> >
> > real*4, real*8, integer*4, integer*8
> >
> > as
> >
> > use iso_fortran_env
> > real(kind=real32), real(kind=real64), integer(kind=int32), integer(kind=int64)
> >
> > would it make sense to standardize the former set of declarations, which is concise and clear, to mean the same as the latter?
> Currently, if someone inherits a code with real*8 and decides to make it standard-conforming, they may replace it with
> real(kind=8),
..
An appropriate replacement is real (kind=dp)
which is one character more than the non-portable form you just suggested.
(where dp is defined as kind(1.0d0) or something equivalent specifying a number of digits )
..
> which is not guaranteed to work (failing with the NAG compiler for example).
> By standardizing real*8 appropriately this error is avoided.
..
real*8 has never been standard.

Re: Standardize real*8 as real(kind=real64)?

<1ab77cb3-b4ac-4e31-8bdc-c6a51683ff09n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:785:0:b0:69c:d66:1120 with SMTP id 127-20020a370785000000b0069c0d661120mr311653qkh.93.1649518753341;
Sat, 09 Apr 2022 08:39:13 -0700 (PDT)
X-Received: by 2002:a0d:ed46:0:b0:2eb:4513:3f4 with SMTP id
w67-20020a0ded46000000b002eb451303f4mr20216788ywe.134.1649518753128; Sat, 09
Apr 2022 08:39:13 -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, 9 Apr 2022 08:39:12 -0700 (PDT)
In-Reply-To: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=173.49.135.235; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 173.49.135.235
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1ab77cb3-b4ac-4e31-8bdc-c6a51683ff09n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Sat, 09 Apr 2022 15:39:13 +0000
Content-Type: text/plain; charset="UTF-8"
 by: FortranFan - Sat, 9 Apr 2022 15:39 UTC

On Saturday, April 9, 2022 at 10:05:29 AM UTC-4, Beliavsky wrote:
> ..
> would it make sense to standardize the former set of declarations, which is concise and clear, to mean the same as the latter?

No.

Re: Standardize real*8 as real(kind=real64)?

<1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:9e55:0:b0:69b:e707:e319 with SMTP id h82-20020a379e55000000b0069be707e319mr4898562qke.561.1649520534118;
Sat, 09 Apr 2022 09:08:54 -0700 (PDT)
X-Received: by 2002:a81:98d2:0:b0:2eb:f367:595b with SMTP id
p201-20020a8198d2000000b002ebf367595bmr4265752ywg.379.1649520533826; Sat, 09
Apr 2022 09:08:53 -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, 9 Apr 2022 09:08:53 -0700 (PDT)
In-Reply-To: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=98.232.94.215; posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 98.232.94.215
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Sat, 09 Apr 2022 16:08:54 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Sat, 9 Apr 2022 16:08 UTC

On Saturday, April 9, 2022 at 7:05:29 AM UTC-7, Beliavsky wrote:
(snip)

> would it make sense to standardize the former set of declarations,
> which is concise and clear, to mean the same as the latter?

One thing that I have long thought, is that it would be nice to include in the
standard some things that aren't required of implementations, but indicate
how to do something if it is included.

(And more generally than this question.)

In the past, this was complicated by machines with 60 or 64 bit words,
that had a type of that length as default REAL, and then (as required by
the standard) a longer type of DOUBLE PRECISION. Those machines are
now out of favor.

On the other hand, the IEEE 754-2008 decimal floating point has
the 64 bit and 128 bit forms as basic types. I suspect that a Fortran
compiler implementing those would use them as the single and
double precision types. (The 32 bit form has about the same status
as the 16 bit binary form.)

There are many deprecated features that it would be very easy to write
a program to convert to non-deprecated form. As far as I know, that hasn't
been done. (And in both free and fixed form.)

I do find it interesting that the Fortran II PRINT statement, after not making
it into Fortran 66, later was included in the standard. Including REAL*8 makes
about as much sense.

Re: Standardize real*8 as real(kind=real64)?

<c50cb339-d6f1-479b-a76b-1af2b48f037an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:4501:0:b0:2ed:b5a:536 with SMTP id q1-20020ac84501000000b002ed0b5a0536mr5735337qtn.463.1649521004583;
Sat, 09 Apr 2022 09:16:44 -0700 (PDT)
X-Received: by 2002:a25:824b:0:b0:635:2f1:c146 with SMTP id
d11-20020a25824b000000b0063502f1c146mr16240554ybn.143.1649521004470; Sat, 09
Apr 2022 09:16:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 9 Apr 2022 09:16:44 -0700 (PDT)
In-Reply-To: <b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=98.232.94.215; posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 98.232.94.215
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com> <b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c50cb339-d6f1-479b-a76b-1af2b48f037an@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Sat, 09 Apr 2022 16:16:44 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 23
 by: gah4 - Sat, 9 Apr 2022 16:16 UTC

On Saturday, April 9, 2022 at 7:37:41 AM UTC-7, Beliavsky wrote:

(snip)

> Currently, if someone inherits a code with real*8 and decides to make it
> standard-conforming, they may replace it with real(kind=8), which is not
> guaranteed to work (failing with the NAG compiler for example).

> By standardizing real*8 appropriately this error is avoided.

As far as I know, REAL(8) is more popular, and equally standard and
non-portable.

I even knew of a MOOC, meant for introducing Fortran to physicists,
that taught REAL(8).

REAL(KIND(1D0))

would be standard, and reliably give a double precision type, though takes
more characters to type.

It is nice to have something that can be replaced, line by line, without the
need for any other lines to be included. (Well, assuming appropriate
continuation rules.)

Re: Standardize real*8 as real(kind=real64)?

<2ed64832-c996-4cd0-9244-560ee1e1ea7an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:b442:0:b0:69a:fc75:ca52 with SMTP id d63-20020a37b442000000b0069afc75ca52mr6422908qkf.730.1649522771508;
Sat, 09 Apr 2022 09:46:11 -0700 (PDT)
X-Received: by 2002:a25:d507:0:b0:63d:a541:1a8c with SMTP id
r7-20020a25d507000000b0063da5411a8cmr17761759ybe.92.1649522771343; Sat, 09
Apr 2022 09:46:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 9 Apr 2022 09:46:11 -0700 (PDT)
In-Reply-To: <c50cb339-d6f1-479b-a76b-1af2b48f037an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=173.76.111.99; posting-account=Ac_J3QkAAABih73tf3Yz4sHazwGUM-hW
NNTP-Posting-Host: 173.76.111.99
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com> <c50cb339-d6f1-479b-a76b-1af2b48f037an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2ed64832-c996-4cd0-9244-560ee1e1ea7an@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: beliavsky@aol.com (Beliavsky)
Injection-Date: Sat, 09 Apr 2022 16:46:11 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 19
 by: Beliavsky - Sat, 9 Apr 2022 16:46 UTC

On Saturday, April 9, 2022 at 12:16:46 PM UTC-4, gah4 wrote:
> As far as I know, REAL(8) is more popular, and equally standard and
> non-portable.
>
> I even knew of a MOOC, meant for introducing Fortran to physicists,
> that taught REAL(8).
>
> REAL(KIND(1D0))
>
> would be standard, and reliably give a double precision type, though takes
> more characters to type.
>
> It is nice to have something that can be replaced, line by line, without the
> need for any other lines to be included. (Well, assuming appropriate
> continuation rules.)

If someone declares variables as real*8 they are saying that 8-byte reals are sufficient.
You could have a platform where singe precision is real(kind=real64) and double
precision is real(kind=real128). In that case the natural equivalent of real*8 would be
real(kind=real128) and not real(kind=kind(1.0d0)).

Re: Standardize real*8 as real(kind=real64)?

<1bj4K.210690$OT%7.139979@fx07.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx07.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0)
Gecko/20100101 Thunderbird/91.7.0
Subject: Re: Standardize real*8 as real(kind=real64)?
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 63
Message-ID: <1bj4K.210690$OT%7.139979@fx07.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sat, 9 Apr 2022 12:15:41 -0500
X-Received-Bytes: 4534
 by: Ron Shepard - Sat, 9 Apr 2022 17:15 UTC

On 4/9/22 9:05 AM, Beliavsky wrote:
> Since compilers treat the non-standard but very common
>
> real*4, real*8, integer*4, integer*8
>
> as
>
> use iso_fortran_env
> real(kind=real32), real(kind=real64), integer(kind=int32), integer(kind=int64)
>
> would it make sense to standardize the former set of declarations, which is concise and clear, to mean the same as the latter?

In my opinion, this would be a step backward for the language.

There are many reasons why this should not be done, but one of them is
that REAL*4 etc. were always just defined by the local compiler to map
to its supported floating point formats. For byte addressable machines,
that meant that your suggested mapping would be correct. But there are
also 36-bit, 60-bit, and 64-bit machines that cannot conform to those
mappings, so they must do something different. In the f77 time in the
1980s, I used those declarations extensively for exactly that reason, it
was a way, with some care, to write portable (but nonstandard) code. I
used REAL*8 declarations to run on machines with all of those word
lengths. It wasn't pretty, but it served its purpose at the time.

But now we have the fortran KIND system, which handles all of that much
better. Yes, when you incorporate old f66 and f77 code into your current
project, you need to edit in those changes, but that is not a big deal.
Your minimal efforts are rewarded with clarity and portability. I have
programs with hundreds of thousands of lines where I can change the
precision globally by modifying a single line of code in a module. From
the programmer's perspective, that is hard to beat.

Numerical analysts are now experimenting with 16-bit real arithmetic to
speed up critical parts of algorithms. If/when they get that working,
the fortran KIND system is already set up to handle that. IEEE decimal
arithmetic is another feature raising its head on the horizon. Again,
the fortran KIND system is already there and waiting. 10-byte arithmetic
is another example (although some compilers are currently doing this the
wrong way, I think). 128-bit arithmetic and beyond, both reals and
integers, are all handled perfectly well with the fortran KIND system.

If a compiler supports real types with those numbers of bits (real32,
real64, etc.), then the kind values are set appropriately. If there is
more than one kind with that many bits, then the processor chooses which
one to return. If the processor does not support a kind with exactly
those bits, then the processor sets the value to either -1 or -2. The -2
value means that some kind is available with higher precision. This
might not be the best way to write portable code, but if you want to
write code targeted to specific floating point formats, that is a
reasonable way to do it. The IEEE intrinsic module goes even further if
code is intended to target that floating point format, rounding modes,
NaN, subnormals, etc., all available within the fortran KIND system.
This is all in contrast to REAL*4, REAL*8, etc, which are mapped in a
very loose manner to the underlying supported floating point formats.

I think the fortran KIND system is well thought out and it works well in
practice. An improvement might be to eliminate shared KIND values
between different types -- that is a sometimes subtle source of code
errors. Another improvement might be the ability to write generic
subprograms that automatically accommodate all supported KINDs of arguments.

$.02 -Ron Shepard

Re: Standardize real*8 as real(kind=real64)?

<d93ae5f0-510f-444e-8ad2-5b1f721bca8cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:29cb:b0:699:fee3:265a with SMTP id s11-20020a05620a29cb00b00699fee3265amr9176125qkp.513.1649527903158;
Sat, 09 Apr 2022 11:11:43 -0700 (PDT)
X-Received: by 2002:a81:2548:0:b0:2eb:fecd:c359 with SMTP id
l69-20020a812548000000b002ebfecdc359mr1974236ywl.348.1649527903019; Sat, 09
Apr 2022 11:11:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 9 Apr 2022 11:11:42 -0700 (PDT)
In-Reply-To: <b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=143.159.58.197; posting-account=xDRY5QoAAAC2FYqWewp8nrpnVLhp0KxM
NNTP-Posting-Host: 143.159.58.197
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com> <b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d93ae5f0-510f-444e-8ad2-5b1f721bca8cn@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: john.collins@simconglobal.com (John Collins)
Injection-Date: Sat, 09 Apr 2022 18:11:43 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: John Collins - Sat, 9 Apr 2022 18:11 UTC

On Saturday, April 9, 2022 at 3:37:41 PM UTC+1, Beliavsky wrote:
> On Saturday, April 9, 2022 at 10:05:29 AM UTC-4, Beliavsky wrote:
> > Since compilers treat the non-standard but very common
> >
> > real*4, real*8, integer*4, integer*8
> >
> > as
> >
> > use iso_fortran_env
> > real(kind=real32), real(kind=real64), integer(kind=int32), integer(kind=int64)
> >
> > would it make sense to standardize the former set of declarations, which is concise and clear, to mean the same as the latter?
> Currently, if someone inherits a code with real*8 and decides to make it standard-conforming, they may replace it with
> real(kind=8), which is not guaranteed to work (failing with the NAG compiler for example). By standardizing real*8 appropriately this error is avoided.

Re: Standardize real*8 as real(kind=real64)?

<698dbafe-a4da-476b-a9f8-b5b73a8dc65bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:9e55:0:b0:69b:e707:e319 with SMTP id h82-20020a379e55000000b0069be707e319mr5208427qke.561.1649528361997;
Sat, 09 Apr 2022 11:19:21 -0700 (PDT)
X-Received: by 2002:a0d:eb8f:0:b0:2eb:f1e4:2653 with SMTP id
u137-20020a0deb8f000000b002ebf1e42653mr4798726ywe.401.1649528361840; Sat, 09
Apr 2022 11:19:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 9 Apr 2022 11:19:21 -0700 (PDT)
In-Reply-To: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=143.159.58.197; posting-account=xDRY5QoAAAC2FYqWewp8nrpnVLhp0KxM
NNTP-Posting-Host: 143.159.58.197
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <698dbafe-a4da-476b-a9f8-b5b73a8dc65bn@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: john.collins@simconglobal.com (John Collins)
Injection-Date: Sat, 09 Apr 2022 18:19:21 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 14
 by: John Collins - Sat, 9 Apr 2022 18:19 UTC

On Saturday, April 9, 2022 at 3:05:29 PM UTC+1, Beliavsky wrote:
> Since compilers treat the non-standard but very common
>
> real*4, real*8, integer*4, integer*8
>
> as
>
> use iso_fortran_env
> real(kind=real32), real(kind=real64), integer(kind=int32), integer(kind=int64)
>
> would it make sense to standardize the former set of declarations, which is concise and clear, to mean the same as the latter?

I am in favour of making this standard, but I think it is academic. I know of no compilers in common use which do not support declarations in this format, and I doubt if any compiler writers would remove them for the sake of annoying some of their users.

The KIND specifications are clear and unambiguous, but in small test programs they can take up a significant proportion of the entire text.

Re: Standardize real*8 as real(kind=real64)?

<2e502003-e53c-458c-93cb-51d6cd9e1093n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:1643:b0:42c:2865:d1e7 with SMTP id f3-20020a056214164300b0042c2865d1e7mr21223048qvw.52.1649529170213;
Sat, 09 Apr 2022 11:32:50 -0700 (PDT)
X-Received: by 2002:a25:e30a:0:b0:625:3d53:91b7 with SMTP id
z10-20020a25e30a000000b006253d5391b7mr17951589ybd.499.1649529170068; Sat, 09
Apr 2022 11:32:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 9 Apr 2022 11:32:49 -0700 (PDT)
In-Reply-To: <1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=143.159.58.197; posting-account=xDRY5QoAAAC2FYqWewp8nrpnVLhp0KxM
NNTP-Posting-Host: 143.159.58.197
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com> <1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2e502003-e53c-458c-93cb-51d6cd9e1093n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: john.collins@simconglobal.com (John Collins)
Injection-Date: Sat, 09 Apr 2022 18:32:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 18
 by: John Collins - Sat, 9 Apr 2022 18:32 UTC

>
> There are many deprecated features that it would be very easy to write
> a program to convert to non-deprecated form. As far as I know, that hasn't
> been done. (And in both free and fixed form.)
>
> I do find it interesting that the Fortran II PRINT statement, after not making
> it into Fortran 66, later was included in the standard. Including REAL*8 makes
> about as much sense.

We have tried to convert a large number of legacy constructs to standard form in fpt (http://simconglobal.com). This includes changing REAL*n to the appropriate kind (Or back again for migration projects where you need to retest on the original host :-) ).

Changing REAL*n, INTEGER*n etc. was easy but some of the conversions were NOT "very easy to write".

Re: Standardize real*8 as real(kind=real64)?

<8c31bd5d-a9e0-4d02-9131-b374c77e44c3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:5289:b0:443:a062:1b4 with SMTP id kj9-20020a056214528900b00443a06201b4mr21133815qvb.24.1649529645325;
Sat, 09 Apr 2022 11:40:45 -0700 (PDT)
X-Received: by 2002:a81:6e84:0:b0:2eb:99b6:6b80 with SMTP id
j126-20020a816e84000000b002eb99b66b80mr20762240ywc.170.1649529645109; Sat, 09
Apr 2022 11:40:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sat, 9 Apr 2022 11:40:44 -0700 (PDT)
In-Reply-To: <698dbafe-a4da-476b-a9f8-b5b73a8dc65bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=165.225.39.113; posting-account=ZZXq9AoAAAAQEcA7zKAGm0UFQh4gMBv7
NNTP-Posting-Host: 165.225.39.113
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com> <698dbafe-a4da-476b-a9f8-b5b73a8dc65bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8c31bd5d-a9e0-4d02-9131-b374c77e44c3n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: parekhvs@gmail.com (FortranFan)
Injection-Date: Sat, 09 Apr 2022 18:40:45 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: FortranFan - Sat, 9 Apr 2022 18:40 UTC

On Saturday, April 9, 2022 at 2:19:23 PM UTC-4, john.c...@simconglobal.com wrote:

> ..
> I am in favour of making this standard ..
> The KIND specifications are clear and unambiguous, but in small test programs they can take up a significant proportion of the entire text.

Should the standard do anything now, a better option will be to simply provide built-in i.e., ALIASes toward type-and-kind equivalent to certain standard floating point formats, say IEEE binary (and perhaps decimal) formats.

For the foreseeable future, the powers-that-be in the industry and research and engineering areas I know only expect to use IEEE binary 64-bit floating point in >99% of computing.

So what will be really useful is to have, say, IEEE_FPB64 as an alias for real(KIND=xx) where xx is IEEE_SELECTED_REAL_KIND( p=, r=, radix=..) corresponding to 64-bit IEEE binary floating point format.

One should then be able to do the following in any processor that provides support for IEEE_xxx features from Fortran 2003+ which is several of the modern Fortran compilers:

ieee_fpb64 :: x

One can combine that with proposal for kinds for literal constants.

Re: Standardize real*8 as real(kind=real64)?

<t2stru$4cj$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-3c49-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Sat, 9 Apr 2022 21:29:34 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t2stru$4cj$1@newsreader4.netcologne.de>
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com>
Injection-Date: Sat, 9 Apr 2022 21:29:34 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-3c49-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:3c49:0:7285:c2ff:fe6c:992d";
logging-data="4499"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sat, 9 Apr 2022 21:29 UTC

gah4 <gah4@u.washington.edu> schrieb:
> On Saturday, April 9, 2022 at 7:05:29 AM UTC-7, Beliavsky wrote:
> (snip)
>
>> would it make sense to standardize the former set of declarations,
>> which is concise and clear, to mean the same as the latter?
>
> One thing that I have long thought, is that it would be nice to include in the
> standard some things that aren't required of implementations, but indicate
> how to do something if it is included.
>
> (And more generally than this question.)
>
> In the past, this was complicated by machines with 60 or 64 bit words,
> that had a type of that length as default REAL, and then (as required by
> the standard) a longer type of DOUBLE PRECISION. Those machines are
> now out of favor.

POWER has rather recently acquired IEEE quad precision, and
gfortran will have aquired support for it in the upcoming
release.

Not as double precision, but as REAL(KIND=16).

Re: Standardize real*8 as real(kind=real64)?

<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2552:b0:67b:32e2:2400 with SMTP id s18-20020a05620a255200b0067b32e22400mr17439839qko.768.1649568924209;
Sat, 09 Apr 2022 22:35:24 -0700 (PDT)
X-Received: by 2002:a81:2548:0:b0:2eb:fecd:c359 with SMTP id
l69-20020a812548000000b002ebfecdc359mr3209728ywl.348.1649568923930; Sat, 09
Apr 2022 22:35:23 -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, 9 Apr 2022 22:35:23 -0700 (PDT)
In-Reply-To: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8003:22c2:8c00:742c:a9b6:1b9:6c51;
posting-account=W6x0LgoAAADUV-yz4YE9o_6nxcvZvCmc
NNTP-Posting-Host: 2001:8003:22c2:8c00:742c:a9b6:1b9:6c51
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: campbelljohnd01@gmail.com (JCampbell)
Injection-Date: Sun, 10 Apr 2022 05:35:24 +0000
Content-Type: text/plain; charset="UTF-8"
 by: JCampbell - Sun, 10 Apr 2022 05:35 UTC

On Sunday, April 10, 2022 at 12:05:29 AM UTC+10, Beliavsky wrote:
> Since compilers treat the non-standard but very common
>
> real*4, real*8, integer*4, integer*8
>
> as
>
> use iso_fortran_env
> real(kind=real32), real(kind=real64), integer(kind=int32), integer(kind=int64)
>
> would it make sense to standardize the former set of declarations, which is concise and clear, to mean the same as the latter?
real*8 and real(kind=real64) both provide a clear documentation of precision.
real(8) unfortunately, is not portable.

real(dp) or real(kind=dp) is not clear, as you need to search for the definition of dp, often in a "remote" module.
sp, dp, qp, wp, r4 or r8 are not standard abbreviations. They are not uncommon real variables in legacy codes.

I use multiple compilers, which have different kind values. Real*8 works easily for me on all compilers I use, while real(kind=dp) has the problem of which compiler last compiled the module where DP was defined.
One compiler has real_kinds of [ 1,2 ] and integer_kinds of [ 1,2,3,4 ]. Try using integers such as 123_4 and see what you get for the different compilers I use.

When using real*8, there is always the danger of using a compiler that does not support this non-standard syntax. I think there are greater dangers out there at the moment!
I have used new Fortran compilers that did not support the real*byte syntax. It has happened a few times and I always successfully lobbied for the compiler to be enhanced.
Most new OS and compilers tend to want to help established users.

IEEE documents also use REAL*8 syntax.

Re: Standardize real*8 as real(kind=real64)?

<4ff41f8e-d7e9-47a8-a6ea-0b2a2a032f4an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:e053:0:b0:443:d1e5:fa0e with SMTP id y19-20020a0ce053000000b00443d1e5fa0emr22221370qvk.87.1649576080806;
Sun, 10 Apr 2022 00:34:40 -0700 (PDT)
X-Received: by 2002:a81:ec07:0:b0:2ca:287c:6c04 with SMTP id
j7-20020a81ec07000000b002ca287c6c04mr21926845ywm.169.1649576080610; Sun, 10
Apr 2022 00:34:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 10 Apr 2022 00:34:40 -0700 (PDT)
In-Reply-To: <t2stru$4cj$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:a9e3:8d5b:a3fe:725c;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:a9e3:8d5b:a3fe:725c
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com> <t2stru$4cj$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4ff41f8e-d7e9-47a8-a6ea-0b2a2a032f4an@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Sun, 10 Apr 2022 07:34:40 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 48
 by: gah4 - Sun, 10 Apr 2022 07:34 UTC

On Saturday, April 9, 2022 at 2:29:37 PM UTC-7, Thomas Koenig wrote:
> gah4 <ga...@u.washington.edu> schrieb:
> > On Saturday, April 9, 2022 at 7:05:29 AM UTC-7, Beliavsky wrote:

(snip)

> > In the past, this was complicated by machines with 60 or 64 bit words,
> > that had a type of that length as default REAL, and then (as required by
> > the standard) a longer type of DOUBLE PRECISION. Those machines are
> > now out of favor.

> POWER has rather recently acquired IEEE quad precision, and
> gfortran will have aquired support for it in the upcoming
> release.
It was the word addressed 60 and 64 bit machines that didn't have
a smaller floating point type. IBM had REAL*16 and COMPLEX*32
since the 360/85 and standard on all S/370 and later models.

I am surprised it took this long to get to POWER.

VAX Fortran also supports REAL*16 and COMPLEX*32, though
software emulated on many machines. That was from close
to the beginning of VAX. (A microcode option on most,
it was standard on the low end 11/730.)

> Not as double precision, but as REAL(KIND=16).

As long as it supports a 32 bit, more or less, type, that isn't
a problem. But the Fortran standard requires, or at least used to,
a double precision twice (more or less) single precision.

But as I noted, for the IEEE 754-2008 decimal float types,
the basic types are 64 and 128 bit.

A Fortran compiler implementing only those, would call them single
and double precision. I believe the later POWER machines support those,
in addition to the binary forms. I would be surprised if someone wrote
a Fortran compiler for POWER supporting only the decimal types.

Note, though, that the DEC compilers for the 36 bit PDP-10
recognize REAL*8 for the 72 bit double precision. I am not sure
about the CDC and Cray compilers. It isn't required that the *8
represent 8 bytes of any specific size. (The PDP-10 byte
instructions work on bytes from 1 to 36 bits. C compilers
tend to use 9 bits for char. C requires char to be an integer
fraction of the word (int) size.)

Re: Standardize real*8 as real(kind=real64)?

<t2u1to$pin$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-3c49-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Sun, 10 Apr 2022 07:44:56 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t2u1to$pin$1@newsreader4.netcologne.de>
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com>
Injection-Date: Sun, 10 Apr 2022 07:44:56 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-3c49-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:3c49:0:7285:c2ff:fe6c:992d";
logging-data="26199"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sun, 10 Apr 2022 07:44 UTC

JCampbell <campbelljohnd01@gmail.com> schrieb:

> real(dp) or real(kind=dp) is not clear, as you need to search for the definition of dp, often in a "remote" module.
> sp, dp, qp, wp, r4 or r8 are not standard abbreviations. They are not uncommon real variables in legacy codes.

They are what I usually use. In most of my projects, I have a small
module

module prec
implicit none
integer, parameter :: sp = selected_real_kind(6)
integer, parameter :: dp = selected_real_kind(15)
integer, parameter :: qp = selected_real_kind(30)
end module prec

> I use multiple compilers, which have different kind values. Real*8 works easily for me on all compilers I use, while real(kind=dp) has the problem of which compiler last compiled the module where DP was defined.

Modules and object code are only valid for one compiler. If you
mix them, you're in for bigger trouble than that.

> One compiler has real_kinds of [ 1,2 ] and integer_kinds of [ 1,2,3,4 ]. Try using integers such as 123_4 and see what you get for the different compilers I use.

nagfor, I presume, although they have the -kind=byte option to
match what others are doing (market pressure, I presume).

I actually like the -kind=unique version best, no possiblity
of mixing up any of the kind numbers.

> When using real*8, there is always the danger of using a compiler
> that does not support this non-standard syntax. I think there
> are greater dangers out there at the moment! I have used new
> Fortran compilers that did not support the real*byte syntax. It
> has happened a few times and I always successfully lobbied for
> the compiler to be enhanced. Most new OS and compilers tend to
> want to help established users.

That is correct. I still find the difference between REAL*8
and COMPLEX*8 a source of confusion, though.

Re: Standardize real*8 as real(kind=real64)?

<0466990c-1db5-4061-8c8d-cfef42349cd4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:13ca:b0:2e1:a52f:18f4 with SMTP id p10-20020a05622a13ca00b002e1a52f18f4mr21634606qtk.412.1649576793371;
Sun, 10 Apr 2022 00:46:33 -0700 (PDT)
X-Received: by 2002:a05:690c:397:b0:2eb:d056:3922 with SMTP id
bh23-20020a05690c039700b002ebd0563922mr12052850ywb.368.1649576793240; Sun, 10
Apr 2022 00:46:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 10 Apr 2022 00:46:33 -0700 (PDT)
In-Reply-To: <2ed64832-c996-4cd0-9244-560ee1e1ea7an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:a9e3:8d5b:a3fe:725c;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:a9e3:8d5b:a3fe:725c
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com> <c50cb339-d6f1-479b-a76b-1af2b48f037an@googlegroups.com>
<2ed64832-c996-4cd0-9244-560ee1e1ea7an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0466990c-1db5-4061-8c8d-cfef42349cd4n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Sun, 10 Apr 2022 07:46:33 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 35
 by: gah4 - Sun, 10 Apr 2022 07:46 UTC

On Saturday, April 9, 2022 at 9:46:13 AM UTC-7, Beliavsky wrote:
> On Saturday, April 9, 2022 at 12:16:46 PM UTC-4, gah4 wrote:
> > As far as I know, REAL(8) is more popular, and equally standard and
> > non-portable.

(snip)

> > REAL(KIND(1D0))
> > would be standard, and reliably give a double precision type, though takes
> > more characters to type.
> > It is nice to have something that can be replaced, line by line, without the
> > need for any other lines to be included. (Well, assuming appropriate
> > continuation rules.)

> If someone declares variables as real*8 they are saying that 8-byte reals are sufficient.
> You could have a platform where singe precision is real(kind=real64) and double
> precision is real(kind=real128). In that case the natural equivalent of real*8 would be
> real(kind=real128) and not real(kind=kind(1.0d0)).

The Cray-1 series are word addressed 64 bit machines, with a 64 bit
floating point type. I believe Fortran supports a software emulated 128
bit type, as required by the standard. But all the Cray machines are, as far
as I know, in museums. (There used to be a machine that would one on
one day a week, as that was how much power they could afford.)

I don't know about Cray support for REAL*8 syntax.

I do remember Fortran programs with a series of declarations and
DATA statements at the beginning, where you uncomment the ones
for the system you are using. That was for the different word size,
and also other constants that varied between machines.

Re: Standardize real*8 as real(kind=real64)?

<t2u2os$qlr$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd6-3c49-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoenig@netcologne.de (Thomas Koenig)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Sun, 10 Apr 2022 07:59:24 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <t2u2os$qlr$1@newsreader4.netcologne.de>
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com>
<t2stru$4cj$1@newsreader4.netcologne.de>
<4ff41f8e-d7e9-47a8-a6ea-0b2a2a032f4an@googlegroups.com>
Injection-Date: Sun, 10 Apr 2022 07:59:24 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd6-3c49-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd6:3c49:0:7285:c2ff:fe6c:992d";
logging-data="27323"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Sun, 10 Apr 2022 07:59 UTC

gah4 <gah4@u.washington.edu> schrieb:
> On Saturday, April 9, 2022 at 2:29:37 PM UTC-7, Thomas Koenig wrote:
>> gah4 <ga...@u.washington.edu> schrieb:
>> > On Saturday, April 9, 2022 at 7:05:29 AM UTC-7, Beliavsky wrote:
>
> (snip)
>
>> > In the past, this was complicated by machines with 60 or 64 bit words,
>> > that had a type of that length as default REAL, and then (as required by
>> > the standard) a longer type of DOUBLE PRECISION. Those machines are
>> > now out of favor.
>
>> POWER has rather recently acquired IEEE quad precision, and
>> gfortran will have aquired support for it in the upcoming
>> release.
>
> It was the word addressed 60 and 64 bit machines that didn't have
> a smaller floating point type. IBM had REAL*16 and COMPLEX*32
> since the 360/85 and standard on all S/370 and later models.
>
> I am surprised it took this long to get to POWER.

IIRC, the REAL*16 types were implemented as two doubles. POWER also
had that (but as a pair of IEEE doubles), and a true headache it
is proving to get rid of that in compiler support.

> VAX Fortran also supports REAL*16 and COMPLEX*32, though
> software emulated on many machines. That was from close
> to the beginning of VAX. (A microcode option on most,
> it was standard on the low end 11/730.)

You will also find it as KIND=16 on gfortran, implemented
in software as well (libquadmath).

Re: Standardize real*8 as real(kind=real64)?

<jbgda9Fmle5U1@mid.individual.net>

  copy mid

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

  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: dick.hendrickson@att.net (Dick Hendrickson)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Sun, 10 Apr 2022 11:01:12 -0500
Lines: 54
Message-ID: <jbgda9Fmle5U1@mid.individual.net>
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<b4166732-03fe-4608-9581-6e7989162aa6n@googlegroups.com>
<c50cb339-d6f1-479b-a76b-1af2b48f037an@googlegroups.com>
<2ed64832-c996-4cd0-9244-560ee1e1ea7an@googlegroups.com>
<0466990c-1db5-4061-8c8d-cfef42349cd4n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 4GqliMpW/Jyy7CTx7fbZ1QpeMdnXNttJNSoFku384AnaPtGZDL
Cancel-Lock: sha1:p3AhG7zKsAGFES4zlx9loEd6SwE=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.14.0
In-Reply-To: <0466990c-1db5-4061-8c8d-cfef42349cd4n@googlegroups.com>
Content-Language: en-US
 by: Dick Hendrickson - Sun, 10 Apr 2022 16:01 UTC

On 4/10/22 2:46 AM, gah4 wrote:
> On Saturday, April 9, 2022 at 9:46:13 AM UTC-7, Beliavsky wrote:
>> On Saturday, April 9, 2022 at 12:16:46 PM UTC-4, gah4 wrote:
>>> As far as I know, REAL(8) is more popular, and equally standard and
>>> non-portable.
>
> (snip)
>
>>> REAL(KIND(1D0))
>
>>> would be standard, and reliably give a double precision type, though takes
>>> more characters to type.
>
>>> It is nice to have something that can be replaced, line by line, without the
>>> need for any other lines to be included. (Well, assuming appropriate
>>> continuation rules.)
>
>> If someone declares variables as real*8 they are saying that 8-byte reals are sufficient.
>> You could have a platform where singe precision is real(kind=real64) and double
>> precision is real(kind=real128). In that case the natural equivalent of real*8 would be
>> real(kind=real128) and not real(kind=kind(1.0d0)).
>
> The Cray-1 series are word addressed 64 bit machines, with a 64 bit
> floating point type. I believe Fortran supports a software emulated 128
> bit type, as required by the standard. But all the Cray machines are, as far
> as I know, in museums. (There used to be a machine that would one on
> one day a week, as that was how much power they could afford.)
>
> I don't know about Cray support for REAL*8 syntax.

Cray supported both real*4 and real*8 syntax. The syntax was easy, the
hard part was deciding what it meant. As you said, there was no
support for a 32 bit real; real*4 declared a 64 bit variable. The
hardware supported 64 bit real and software emulation did the 128 bit
real. The problem was most people used real*8 because 64 bits was
enough, not that they needed "double precision". Promoting real*8 to
twice the size of a real*4 wasn't what they wanted for performance.
Ultimately, we gave them a control card option to effectively treat
real*4 and real*8 as identical. Fortunately, the standard let us do that.

Dick Hendrickson

PS: there was one syntax issue. Things like REAL*4 HENRY initially
gave the parser fits.

>
> I do remember Fortran programs with a series of declarations and
> DATA statements at the beginning, where you uncomment the ones
> for the system you are using. That was for the different word size,
> and also other constants that varied between machines.
>
>
>

Re: Standardize real*8 as real(kind=real64)?

<efcadfd1-59ac-44c1-86f8-731c1a1b24f9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5ad6:0:b0:2e2:27b6:7b3e with SMTP id d22-20020ac85ad6000000b002e227b67b3emr23942357qtd.216.1649607360498;
Sun, 10 Apr 2022 09:16:00 -0700 (PDT)
X-Received: by 2002:a25:c00a:0:b0:633:95d3:e2b with SMTP id
c10-20020a25c00a000000b0063395d30e2bmr19843714ybf.366.1649607360341; Sun, 10
Apr 2022 09:16:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 10 Apr 2022 09:16:00 -0700 (PDT)
In-Reply-To: <t2u2os$qlr$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:d84:19b:184c:5154;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:d84:19b:184c:5154
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com> <t2stru$4cj$1@newsreader4.netcologne.de>
<4ff41f8e-d7e9-47a8-a6ea-0b2a2a032f4an@googlegroups.com> <t2u2os$qlr$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <efcadfd1-59ac-44c1-86f8-731c1a1b24f9n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Sun, 10 Apr 2022 16:16:00 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 44
 by: gah4 - Sun, 10 Apr 2022 16:16 UTC

On Sunday, April 10, 2022 at 12:59:28 AM UTC-7, Thomas Koenig wrote:
> gah4 <ga...@u.washington.edu> schrieb:

(snip)

> > It was the word addressed 60 and 64 bit machines that didn't have
> > a smaller floating point type. IBM had REAL*16 and COMPLEX*32
> > since the 360/85 and standard on all S/370 and later models.
> >
> > I am surprised it took this long to get to POWER.

> IIRC, the REAL*16 types were implemented as two doubles. POWER also
> had that (but as a pair of IEEE doubles), and a true headache it
> is proving to get rid of that in compiler support.

The IBM HFP 16 byte type has the form of two of the usual 8 byte type.
Base 16 like the others, with a 7 bit exponent. That is the form that the
360/85 implemented, and was carried on through S/370 and ESA/390.

When IBM did it, they implemented DXR, extended precision divide,
only in software emulation. Statistics said that it wasn't used all that
much, such that it wasn't worth doing in hardware. The "two doubles"
format makes the software emulation a little easier, and 112 bits
is enough.

They also wrote the emulation software for other S/360 models,
again the format makes it easier. My first hand disassembly of
a whole program was those emulators. (After I figured out
how to extract hex dumps from load module libraries.
Sometime in high school years, if you are counting.)

Also, the 16 byte values are stored in a pair of floating
point registers. S/360 only has four such registers, so
only two pairs. Later, ESA/390 added more registers.

Also, late in the ESA/390 years, so maybe 1995 or so, they finally
added DXR to hardware. Maybe about the time that IEEE binary
floating point was added, including a 16 byte form.

Re: Standardize real*8 as real(kind=real64)?

<%uE4K.417631$iK66.298298@fx46.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx46.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0)
Gecko/20100101 Thunderbird/91.7.0
Subject: Re: Standardize real*8 as real(kind=real64)?
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<1638968c-c8fe-44c5-80e6-96651e48b066n@googlegroups.com>
<t2stru$4cj$1@newsreader4.netcologne.de>
<4ff41f8e-d7e9-47a8-a6ea-0b2a2a032f4an@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <4ff41f8e-d7e9-47a8-a6ea-0b2a2a032f4an@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 38
Message-ID: <%uE4K.417631$iK66.298298@fx46.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sun, 10 Apr 2022 12:30:35 -0500
X-Received-Bytes: 3367
 by: Ron Shepard - Sun, 10 Apr 2022 17:30 UTC

On 4/10/22 2:34 AM, gah4 wrote:
> Note, though, that the DEC compilers for the 36 bit PDP-10
> recognize REAL*8 for the 72 bit double precision. I am not sure
> about the CDC and Cray compilers. It isn't required that the *8
> represent 8 bytes of any specific size. (The PDP-10 byte
> instructions work on bytes from 1 to 36 bits. C compilers
> tend to use 9 bits for char. C requires char to be an integer
> fraction of the word (int) size.)

I remember using these machines in the late 1970s. My memory might be
off, but I remember being able to use REAL*4 (mapped to 36-bit single
precision) and REAL*8 (mapped to 72-bit double precision). This was
before the CHARACTER type was available, but Hollerith characters could
be stored in integer, real, double precision, or logical variables, or
even used in literal constants pretty freely. They were 7-bit ascii
characters, up to 5 per word (so one bit per word could be used by the
programmer for something else, if necessary). I never used an f77
compiler on those machines, but I think they did exist later on. I never
used C on those machines, so I do not know about its 9-bit characters,
but that would have been incompatible with both the fortran convention
and with all of the other uses of characters in the operating system
(file names, interactive shells, text editors, etc.).

I think gfortan even now has options that treat real*8 declarations as
single precision and real*16 as double precision. I don't use these, but
I think integer and logical kinds are all promoted too, so everything
works the way it should according to the standard storage sequence
requirements. There are, of course, incompatibilities with external
libraries such as BLAS and LAPACK that, in their naming convention,
continue to treat 4-byte integers and reals as single precision.

I also remember when CRAY started using byte-addressable CPUs (i.e. MIPS
and AMD chips). They tried to include options that would facilitate
porting from their earlier 64-bit word machines, but it was easy to make
mistakes with, for example, integer and real storage sequence
associations in common blocks.

$.02 -Ron Shepard

Re: Standardize real*8 as real(kind=real64)?

<uLE4K.3352$1%.176@fx42.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx42.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0)
Gecko/20100101 Thunderbird/91.7.0
Subject: Re: Standardize real*8 as real(kind=real64)?
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com>
<t2u1to$pin$1@newsreader4.netcologne.de>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <t2u1to$pin$1@newsreader4.netcologne.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 30
Message-ID: <uLE4K.3352$1%.176@fx42.iad>
X-Complaints-To: abuse@easynews.com
Organization: Forte - www.forteinc.com
X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly.
Date: Sun, 10 Apr 2022 12:48:10 -0500
X-Received-Bytes: 2168
 by: Ron Shepard - Sun, 10 Apr 2022 17:48 UTC

On 4/10/22 2:44 AM, Thomas Koenig wrote:
>> real(dp) or real(kind=dp) is not clear, as you need to search for the definition of dp, often in a "remote" module.
>> sp, dp, qp, wp, r4 or r8 are not standard abbreviations. They are not uncommon real variables in legacy codes.
> They are what I usually use. In most of my projects, I have a small
> module
>
> module prec
> implicit none
> integer, parameter :: sp = selected_real_kind(6)
> integer, parameter :: dp = selected_real_kind(15)
> integer, parameter :: qp = selected_real_kind(30)
> end module prec

Just to include this possibility into the mix, there is also

real*8, private :: temp
integer, parameter :: wp=kind(temp)

The rest of the code should use the "wp" parameter of course, in
declarations and in literal constants, but in that one module, it isn't
so bad to use real*8 in that one place. Once it is localized like this,
it isn't even so bad to hardwire the kind number.

integer, parameter :: wp=8

The big porting problems arise when the "8" is scattered throughout the
source code.

$.02 -Ron Shepard

Re: Standardize real*8 as real(kind=real64)?

<dd59607c-a368-4cb4-9ece-ab09c4500da2n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:1643:b0:42c:2865:d1e7 with SMTP id f3-20020a056214164300b0042c2865d1e7mr25070882qvw.52.1649630618001;
Sun, 10 Apr 2022 15:43:38 -0700 (PDT)
X-Received: by 2002:a25:7753:0:b0:641:2056:7186 with SMTP id
s80-20020a257753000000b0064120567186mr4987855ybc.102.1649630617726; Sun, 10
Apr 2022 15:43:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 10 Apr 2022 15:43:37 -0700 (PDT)
In-Reply-To: <t2u1to$pin$1@newsreader4.netcologne.de>
Injection-Info: google-groups.googlegroups.com; posting-host=115.189.82.158; posting-account=KnYfEgoAAAD1tUJTvdAUZ3XojNa5tezZ
NNTP-Posting-Host: 115.189.82.158
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <t2u1to$pin$1@newsreader4.netcologne.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dd59607c-a368-4cb4-9ece-ab09c4500da2n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: harperjf2@gmail.com (jfh)
Injection-Date: Sun, 10 Apr 2022 22:43:37 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 24
 by: jfh - Sun, 10 Apr 2022 22:43 UTC

On Sunday, April 10, 2022 at 7:44:59 PM UTC+12, Thomas Koenig wrote:
> JCampbell <campbel...@gmail.com> schrieb:
> > real(dp) or real(kind=dp) is not clear, as you need to search for the definition of dp, often in a "remote" module.
> > sp, dp, qp, wp, r4 or r8 are not standard abbreviations. They are not uncommon real variables in legacy codes.
> They are what I usually use. In most of my projects, I have a small
> module
>
> module prec
> implicit none
> integer, parameter :: sp = selected_real_kind(6)
> integer, parameter :: dp = selected_real_kind(15)
> integer, parameter :: qp = selected_real_kind(30)
> end module prec
> > I use multiple compilers, which have different kind values. Real*8 works easily for me on all compilers I use, while real(kind=dp) has the problem of which compiler last compiled the module where DP was defined.

In one of my projects where I test programs with lower precision to save run time but finish up using the highest I use a little module like this:

module myprec
integer, parameter :: prec(4) = [6,15,18,33]
integer, parameter :: wp = selected_real_kind(prec(2))
end module myprec

when I want what gfortran and ifort call double precision. Changing the desired precision requires changing only the 2 into 1, 3 or 4, and no change is needed in a program that uses that module.
That works well with gfortran but when compiling with ifort I must remember that asking for prec(3) is the same as asking for prec(4).

Re: Standardize real*8 as real(kind=real64)?

<afd911fb-e9f9-47df-9c06-bb7d45327ccfn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:9243:0:b0:69b:6009:856d with SMTP id u64-20020a379243000000b0069b6009856dmr9710947qkd.274.1649651917266;
Sun, 10 Apr 2022 21:38:37 -0700 (PDT)
X-Received: by 2002:a81:5309:0:b0:2e6:dcfc:8665 with SMTP id
h9-20020a815309000000b002e6dcfc8665mr23554476ywb.501.1649651917022; Sun, 10
Apr 2022 21:38:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Sun, 10 Apr 2022 21:38:36 -0700 (PDT)
In-Reply-To: <dd59607c-a368-4cb4-9ece-ab09c4500da2n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:8003:22c2:8c00:e199:ac2f:e5d5:f2da;
posting-account=W6x0LgoAAADUV-yz4YE9o_6nxcvZvCmc
NNTP-Posting-Host: 2001:8003:22c2:8c00:e199:ac2f:e5d5:f2da
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <t2u1to$pin$1@newsreader4.netcologne.de>
<dd59607c-a368-4cb4-9ece-ab09c4500da2n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <afd911fb-e9f9-47df-9c06-bb7d45327ccfn@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: campbelljohnd01@gmail.com (JCampbell)
Injection-Date: Mon, 11 Apr 2022 04:38:37 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 28
 by: JCampbell - Mon, 11 Apr 2022 04:38 UTC

On Monday, April 11, 2022 at 8:43:39 AM UTC+10, jfh wrote:
> On Sunday, April 10, 2022 at 7:44:59 PM UTC+12, Thomas Koenig wrote:
> > JCampbell <campbel...@gmail.com> schrieb:
> > > real(dp) or real(kind=dp) is not clear, as you need to search for the definition of dp, often in a "remote" module.
> > > sp, dp, qp, wp, r4 or r8 are not standard abbreviations. They are not uncommon real variables in legacy codes.
> > They are what I usually use. In most of my projects, I have a small
> > module
> >
> > module prec
> > implicit none
> > integer, parameter :: sp = selected_real_kind(6)
> > integer, parameter :: dp = selected_real_kind(15)
> > integer, parameter :: qp = selected_real_kind(30)
> > end module prec
> > > I use multiple compilers, which have different kind values. Real*8 works easily for me on all compilers I use, while real(kind=dp) has the problem of which compiler last compiled the module where DP was defined.
> In one of my projects where I test programs with lower precision to save run time but finish up using the highest I use a little module like this:
>
> module myprec
> integer, parameter :: prec(4) = [6,15,18,33]
> integer, parameter :: wp = selected_real_kind(prec(2))
> end module myprec
>
> when I want what gfortran and ifort call double precision. Changing the desired precision requires changing only the 2 into 1, 3 or 4, and no change is needed in a program that uses that module.
>
> That works well with gfortran but when compiling with ifort I must remember that asking for prec(3) is the same as asking for prec(4).
I am not sure I would agree that real*10 works well with gfortran, especially considering the memory storage approach.
I do miss the precision of 8087 real*10, especially for loop accumulators, but the improved performance of real*8 SIMD : MMX, SSE and AVX is a must.
I have felt cheated by the alignment issues with SSE and AVX, which should have always been solved by the hardware and not left for programmers to try and fix with messy memory address calculations.
Rather than 8, 16 or 32 byte compiler alignment options for arrays, why is there not a 4096 byte (memory page) alignment, which "might" be useful for multi-threading for heap ALLOCATE arrays ?

Re: Standardize real*8 as real(kind=real64)?

<afc61d40-519f-410e-aaaf-baca0076206cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:f8ca:0:b0:444:41e8:89b1 with SMTP id h10-20020a0cf8ca000000b0044441e889b1mr3736064qvo.22.1649666902120;
Mon, 11 Apr 2022 01:48:22 -0700 (PDT)
X-Received: by 2002:a25:acdb:0:b0:641:46d5:c2d9 with SMTP id
x27-20020a25acdb000000b0064146d5c2d9mr3026593ybd.143.1649666901852; Mon, 11
Apr 2022 01:48:21 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 11 Apr 2022 01:48:21 -0700 (PDT)
In-Reply-To: <uLE4K.3352$1%.176@fx42.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <t2u1to$pin$1@newsreader4.netcologne.de>
<uLE4K.3352$1%.176@fx42.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <afc61d40-519f-410e-aaaf-baca0076206cn@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Mon, 11 Apr 2022 08:48:22 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 29
 by: Robin Vowels - Mon, 11 Apr 2022 08:48 UTC

On Monday, April 11, 2022 at 3:48:14 AM UTC+10, Ron Shepard wrote:
> On 4/10/22 2:44 AM, Thomas Koenig wrote:
> >> real(dp) or real(kind=dp) is not clear, as you need to search for the definition of dp, often in a "remote" module.
> >> sp, dp, qp, wp, r4 or r8 are not standard abbreviations. They are not uncommon real variables in legacy codes.
> > They are what I usually use. In most of my projects, I have a small
> > module
> >
> > module prec
> > implicit none
> > integer, parameter :: sp = selected_real_kind(6)
> > integer, parameter :: dp = selected_real_kind(15)
> > integer, parameter :: qp = selected_real_kind(30)
> > end module prec
> Just to include this possibility into the mix, there is also
>
> real*8, private :: temp
..
It REALly isn't standard, is it !!
..
> integer, parameter :: wp=kind(temp)

> The rest of the code should use the "wp" parameter of course, in
> declarations and in literal constants, but in that one module, it isn't
> so bad to use real*8 in that one place. Once it is localized like this,
> it isn't even so bad to hardwire the kind number.
>
> integer, parameter :: wp=8
>
> The big porting problems arise when the "8" is scattered throughout the
> source code.

Pages:12345
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor