Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The man on tops walks a lonely street; the "chain" of command is often a noose.


devel / comp.lang.fortran / Re: 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
Re: Standardize real*8 as real(kind=real64)?

<824ae8ab-3669-454f-b1ab-179b866dba72n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:4512:b0:67d:52fc:4792 with SMTP id t18-20020a05620a451200b0067d52fc4792mr20911214qkp.458.1649667624260;
Mon, 11 Apr 2022 02:00:24 -0700 (PDT)
X-Received: by 2002:a81:9d1:0:b0:2eb:ee42:4281 with SMTP id
200-20020a8109d1000000b002ebee424281mr10270944ywj.371.1649667624013; Mon, 11
Apr 2022 02:00:24 -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 02:00:23 -0700 (PDT)
In-Reply-To: <698dbafe-a4da-476b-a9f8-b5b73a8dc65bn@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> <698dbafe-a4da-476b-a9f8-b5b73a8dc65bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <824ae8ab-3669-454f-b1ab-179b866dba72n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Mon, 11 Apr 2022 09:00:24 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 24
 by: Robin Vowels - Mon, 11 Apr 2022 09:00 UTC

On Sunday, April 10, 2022 at 4:19:23 AM UTC+10, john.c...@simconglobal.com wrote:
> 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.
..
In small test programs, REAL and DOUBLE PRECISION are clear,
and can be written quickly.

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

<d452b68b-207a-43ae-b132-65b829a63851n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:aec7:0:b0:69b:f27b:8784 with SMTP id x190-20020a37aec7000000b0069bf27b8784mr7966498qke.464.1649667782671;
Mon, 11 Apr 2022 02:03:02 -0700 (PDT)
X-Received: by 2002:a0d:ed46:0:b0:2eb:4513:3f4 with SMTP id
w67-20020a0ded46000000b002eb451303f4mr25010765ywe.134.1649667782158; Mon, 11
Apr 2022 02:03:02 -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 02:03:01 -0700 (PDT)
In-Reply-To: <1bj4K.210690$OT%7.139979@fx07.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> <1bj4K.210690$OT%7.139979@fx07.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d452b68b-207a-43ae-b132-65b829a63851n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Mon, 11 Apr 2022 09:03:02 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 33
 by: Robin Vowels - Mon, 11 Apr 2022 09:03 UTC

On Sunday, April 10, 2022 at 3:15:45 AM UTC+10, Ron Shepard wrote:
> 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.
..
Indeed !!!

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

<162a97ff-f178-49f3-9304-7d632bce53c9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:4e46:0:b0:2e1:b933:ec06 with SMTP id e6-20020ac84e46000000b002e1b933ec06mr25136911qtw.684.1649668065677;
Mon, 11 Apr 2022 02:07:45 -0700 (PDT)
X-Received: by 2002:a25:c00a:0:b0:633:95d3:e2b with SMTP id
c10-20020a25c00a000000b0063395d30e2bmr21659033ybf.366.1649668065487; Mon, 11
Apr 2022 02:07: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: Mon, 11 Apr 2022 02:07:45 -0700 (PDT)
In-Reply-To: <8c31bd5d-a9e0-4d02-9131-b374c77e44c3n@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>
<698dbafe-a4da-476b-a9f8-b5b73a8dc65bn@googlegroups.com> <8c31bd5d-a9e0-4d02-9131-b374c77e44c3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <162a97ff-f178-49f3-9304-7d632bce53c9n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Mon, 11 Apr 2022 09:07:45 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 18
 by: Robin Vowels - Mon, 11 Apr 2022 09:07 UTC

On Sunday, April 10, 2022 at 4:40:46 AM UTC+10, FortranFan wrote:
> 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
..
Can we not write in English? REAL (KIND=DP) :: x
..
> One can combine that with proposal for kinds for literal constants.

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

<392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:6382:0:b0:69b:fbde:42d1 with SMTP id x124-20020a376382000000b0069bfbde42d1mr6219954qkb.48.1649668891720;
Mon, 11 Apr 2022 02:21:31 -0700 (PDT)
X-Received: by 2002:a81:98d2:0:b0:2eb:f367:595b with SMTP id
p201-20020a8198d2000000b002ebf367595bmr8788494ywg.379.1649668891496; Mon, 11
Apr 2022 02:21:31 -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 02:21:31 -0700 (PDT)
In-Reply-To: <f520ba36-83fe-4ba1-a444-64c82a92559cn@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> <f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Mon, 11 Apr 2022 09:21:31 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 51
 by: Robin Vowels - Mon, 11 Apr 2022 09:21 UTC

On Sunday, April 10, 2022 at 3:35:25 PM UTC+10, JCampbell wrote:
> 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.
..
and real*8 is not standard.
>.
> real(dp) or real(kind=dp) is not clear,
..
in what way? "dp" is used often enough that it is immediately clear
that it signifies double precision.
..
>as you need to search for the definition of dp,
..
Really?
The purpose of using such "words" as 'dp' and 'wp' in your
programs makes it clear what the words mean.
..
> 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.
..
Can't say I have seen these in any old codes.
..
> I use multiple compilers, which have different kind values. Real*8 works easily for me on all compilers I use,
..
So does DOUBLE PRECISION, which is STANDARD.
..
> 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.
..
Don't use such silly suffixes.
..
> 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.
..
"enhanced"? you mean, down-graded.
..
> Most new OS and compilers tend to want to help established users.
>
> IEEE documents also use REAL*8 syntax.
..
So what?

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

<t31jkp$foa$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (steve kargl)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Mon, 11 Apr 2022 16:05:46 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <t31jkp$foa$1@dont-email.me>
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> <afd911fb-e9f9-47df-9c06-bb7d45327ccfn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 11 Apr 2022 16:05:46 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e8a6201319870ac9a4a9b18b346f33fb";
logging-data="16138"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VR62QG75gMCaKJCkAQaVS"
User-Agent: XPN/1.2.6 (Street Spirit ; FreeBSD)
Cancel-Lock: sha1:wDHomWlbmAMFOSSMtGMv6h2aJwY=
 by: steve kargl - Mon, 11 Apr 2022 16:05 UTC

JCampbell wrote:

> I am not sure I would agree that real*10 works well with gfortran, especially considering the memory storage approach.

Can you elaborate?

gfortran's real(10) on x86_64 class hardware is Intel 80-bit
extended double precision.

--
steve

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

<xY35K.3389$1%.1625@fx42.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.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>
<dd59607c-a368-4cb4-9ece-ab09c4500da2n@googlegroups.com>
<afd911fb-e9f9-47df-9c06-bb7d45327ccfn@googlegroups.com>
<t31jkp$foa$1@dont-email.me>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <t31jkp$foa$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 21
Message-ID: <xY35K.3389$1%.1625@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: Mon, 11 Apr 2022 19:45:16 -0500
X-Received-Bytes: 1985
 by: Ron Shepard - Tue, 12 Apr 2022 00:45 UTC

On 4/11/22 11:05 AM, steve kargl wrote:
> JCampbell wrote:
>
>> I am not sure I would agree that real*10 works well with gfortran, especially considering the memory storage approach.
>
> Can you elaborate?
>
> gfortran's real(10) on x86_64 class hardware is Intel 80-bit
> extended double precision.

I think the problem people have is that it is stored in 16 bytes, so
there is a lot of wasted memory and/or file space.

I'm glad the option is there, for example for accumulating sums with
extended precision, but its overall usefulness is limited because of
those wasted 48-bits per value. Programmers instead are likely just to
use the 128-bit floating point kind which takes up the same memory/file
space. And it is nice to have the 128-bit kind supported too.

$.02 -Ron Shepard

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

<t348mf$la9$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (steve kargl)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Tue, 12 Apr 2022 16:17:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <t348mf$la9$1@dont-email.me>
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> <afd911fb-e9f9-47df-9c06-bb7d45327ccfn@googlegroups.com> <t31jkp$foa$1@dont-email.me> <xY35K.3389$1%.1625@fx42.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 12 Apr 2022 16:17:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5e3ea993e48f95df392b698b852a6dfb";
logging-data="21833"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dW5CSGzczdTUpiA6cpfFb"
User-Agent: XPN/1.2.6 (Street Spirit ; FreeBSD)
Cancel-Lock: sha1:xyK/JRLMDg7V8+tlo1+Tky+KSHI=
 by: steve kargl - Tue, 12 Apr 2022 16:17 UTC

Ron Shepard wrote:

> On 4/11/22 11:05 AM, steve kargl wrote:
>> JCampbell wrote:
>>
>>> I am not sure I would agree that real*10 works well with gfortran, especially considering the memory storage approach.
>>
>> Can you elaborate?
>>
>> gfortran's real(10) on x86_64 class hardware is Intel 80-bit
>> extended double precision.
>
> I think the problem people have is that it is stored in 16 bytes, so
> there is a lot of wasted memory and/or file space.
>
> I'm glad the option is there, for example for accumulating sums with
> extended precision, but its overall usefulness is limited because of
> those wasted 48-bits per value. Programmers instead are likely just to
> use the 128-bit floating point kind which takes up the same memory/file
> space. And it is nice to have the 128-bit kind supported too.

Then those people are blaming the wrong thing. Intel choose 4, 8, and 16-byte
alignment in their ABIs. gfortran (and gcc) are just a tool sitting above the cpu.

--
steve

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

<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:29c2:b0:444:9d4f:4ed0 with SMTP id gh2-20020a05621429c200b004449d4f4ed0mr3348761qvb.90.1649786659993;
Tue, 12 Apr 2022 11:04:19 -0700 (PDT)
X-Received: by 2002:a25:34f:0:b0:641:3840:3725 with SMTP id
76-20020a25034f000000b0064138403725mr10516691ybd.183.1649786659699; Tue, 12
Apr 2022 11:04:19 -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: Tue, 12 Apr 2022 11:04:19 -0700 (PDT)
In-Reply-To: <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=195.80.8.170; posting-account=xDRY5QoAAAC2FYqWewp8nrpnVLhp0KxM
NNTP-Posting-Host: 195.80.8.170
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: john.collins@simconglobal.com (John Collins)
Injection-Date: Tue, 12 Apr 2022 18:04:19 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 25
 by: John Collins - Tue, 12 Apr 2022 18:04 UTC

On Monday, April 11, 2022 at 10:21:33 AM UTC+1, Robin Vowels wrote:
<snip>> .
> So does DOUBLE PRECISION, which is STANDARD.
> .

I'm not sure that it is, or at least, not in a helpful way. A system with a default 64-bit real number might interpret DOUBLE PRECISION as 128-bit.

I agree that standardising REAL*8 would inject a fossil into the language. Perhaps a way forward is to define a new class of PARAMETER for types and kinds, e.g.

PARAMETER,KIND :: REAL_8 = REAL,KIND=KIND(1.0D0)

Then REAL_8 could only be used in a kind specification and would always mean the same thing. This would avoid an error which we found recently in an important code where the user had written an expression of the form:

REAL(dp),PARAMETER :: kappa = 68431_dp

dp was (as a result of SELECTED_REAL_KIND) equal to 8 so the integer was defined as 64-bits and no error occurred on the original ifort compiler. What NAG or FTN95 would have done with it I don't want to know. We don't (yet) know how many more of these are likely to turn up. The compiler could issue an error if a parameterised KIND were used as a tag for an integer literal.

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

<2a3c9189-379c-4ea8-8227-eeaaf70ee84en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5c4d:0:b0:2e0:71b7:2829 with SMTP id j13-20020ac85c4d000000b002e071b72829mr4431601qtj.323.1649787810682;
Tue, 12 Apr 2022 11:23:30 -0700 (PDT)
X-Received: by 2002:a25:4203:0:b0:641:39ff:c69f with SMTP id
p3-20020a254203000000b0064139ffc69fmr9942753yba.498.1649787810541; Tue, 12
Apr 2022 11:23:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.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: Tue, 12 Apr 2022 11:23:30 -0700 (PDT)
In-Reply-To: <07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:85cc:d731:3619:486c;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:85cc:d731:3619:486c
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a3c9189-379c-4ea8-8227-eeaaf70ee84en@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Tue, 12 Apr 2022 18:23:30 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 48
 by: gah4 - Tue, 12 Apr 2022 18:23 UTC

On Tuesday, April 12, 2022 at 11:04:21 AM UTC-7, john.c...@simconglobal.com wrote:

(snip)

> I agree that standardising REAL*8 would inject a fossil into the language.
> Perhaps a way forward is to define a new class of PARAMETER for types and kinds, e.g.
> PARAMETER,KIND :: REAL_8 = REAL,KIND=KIND(1.0D0)
> Then REAL_8 could only be used in a kind specification and would always mean the same thing.
> This would avoid an error which we found recently in an important code where
> the user had written an expression of the form:
> REAL(dp),PARAMETER :: kappa = 68431_dp

The KIND values could have been required to be different for different
types, though they are required to be the same for a REAL type and the
twice as big COMPLEX type.

(IBM and DEC call the double precision complex type REAL*16.)

> dp was (as a result of SELECTED_REAL_KIND) equal to 8 so the integer
> was defined as 64-bits and no error occurred on the original ifort compiler.

> What NAG or FTN95 would have done with it I don't want to know.
> We don't (yet) know how many more of these are likely to turn up.
> The compiler could issue an error if a parameterised KIND were used as a tag for an integer literal.

As well as I know the standard, the KIND values are just integers.

The standard doesn't care much where you get your KIND values,
as long as the one you come up with is supported.

REAL(dp),PARAMETER :: kappa = 68431_dp

is legal, standard, but not portable.

I suspect one could claim that reusing KIND values between INTEGER and
REAL kinds is a quality of implementation issue, and that a high quality
implementation would not do that. Start sending in bug reports!

The original subject here is the non-standard REAL*8, but there is the
standard, non-portable, and way too common REAL(8).

There is no suggestion in the standard that REAL(8) exists,
and even less that it is an 8 byte or 64 bit type.

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

<t34lac$utb$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (steve kargl)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Tue, 12 Apr 2022 19:52:44 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <t34lac$utb$1@dont-email.me>
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com> <f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com> <07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 12 Apr 2022 19:52:44 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5e3ea993e48f95df392b698b852a6dfb";
logging-data="31659"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QEgjOyn81BMFeQQPhKJhG"
User-Agent: XPN/1.2.6 (Street Spirit ; FreeBSD)
Cancel-Lock: sha1:lfgtsBmsQ5Ew+dlc/5ORLSxc9yM=
 by: steve kargl - Tue, 12 Apr 2022 19:52 UTC

John Collins wrote:

> On Monday, April 11, 2022 at 10:21:33 AM UTC+1, Robin Vowels wrote:
> <snip>> .
>> So does DOUBLE PRECISION, which is STANDARD.
>> .
>
> I'm not sure that it is, or at least, not in a helpful way. A system with a default 64-bit real number might interpret DOUBLE PRECISION as 128-bit.
>

DOUBLE PRECISION is defined by the standard. An entity with
default REAL kind type occupies one numeric storage unit.
An entity with DOUBLE PRECISION type occupies two numeric
storage units. If one numeric storage unit is 64 bits, then
two would use 128 bits.

--
steve

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

<t34m3v$7nk$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!fBwpQ5YOEnW7IjMZ6sE+uA.user.46.165.242.75.POSTED!not-for-mail
From: helbig@asclothestro.multivax.de (Phillip Helbig (undress to reply)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Tue, 12 Apr 2022 20:06:23 -0000 (UTC)
Organization: Multivax C&R
Message-ID: <t34m3v$7nk$1@gioia.aioe.org>
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com> <f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com> <07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <t34lac$utb$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="7924"; posting-host="fBwpQ5YOEnW7IjMZ6sE+uA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: Phillip Helbig (undr - Tue, 12 Apr 2022 20:06 UTC

In article <t34lac$utb$1@dont-email.me>, steve kargl
<sgk@REMOVEtroutmask.apl.washington.edu> writes:

> John Collins wrote:
>
> > On Monday, April 11, 2022 at 10:21:33 AM UTC+1, Robin Vowels wrote:
> > <snip>> .
> >> So does DOUBLE PRECISION, which is STANDARD.
> >> .
> >
> > I'm not sure that it is, or at least, not in a helpful way. A system with a default 64-bit real number might interpret DOUBLE PRECISION as 128-bit.
> >
>
> DOUBLE PRECISION is defined by the standard. An entity with
> default REAL kind type occupies one numeric storage unit.
> An entity with DOUBLE PRECISION type occupies two numeric
> storage units. If one numeric storage unit is 64 bits, then
> two would use 128 bits.

Right. DOUBLE is really double the size, since the actual precision,
however it is measured, can vary, and is usually not double.

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

<13d93be8-f1f0-4df3-a766-9a63b797e3can@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:89:b0:2e1:b8c7:9975 with SMTP id o9-20020a05622a008900b002e1b8c79975mr4866409qtw.342.1649796035686;
Tue, 12 Apr 2022 13:40:35 -0700 (PDT)
X-Received: by 2002:a0d:eb8f:0:b0:2eb:f1e4:2653 with SMTP id
u137-20020a0deb8f000000b002ebf1e42653mr15895371ywe.401.1649796035553; Tue, 12
Apr 2022 13:40:35 -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: Tue, 12 Apr 2022 13:40:35 -0700 (PDT)
In-Reply-To: <t34lac$utb$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:150:d6ba:1adf:4006;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:150:d6ba:1adf:4006
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <t34lac$utb$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <13d93be8-f1f0-4df3-a766-9a63b797e3can@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Tue, 12 Apr 2022 20:40:35 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gah4 - Tue, 12 Apr 2022 20:40 UTC

On Tuesday, April 12, 2022 at 12:52:47 PM UTC-7, steve kargl wrote:

(snip)

> DOUBLE PRECISION is defined by the standard. An entity with
> default REAL kind type occupies one numeric storage unit.
> An entity with DOUBLE PRECISION type occupies two numeric
> storage units. If one numeric storage unit is 64 bits, then
> two would use 128 bits.

Yes, the word addressed Cray machines with 64 bit words, and CDC machines with 60 bit
words, did not have a smaller type. So the Fortran required double precision had to
be 128 bits, or 120 bits, respectively, and as well as I know, was done in software.

As far as I know, all those are in museums, so we don't have to plan for them.
Is there any thought that more such processor might be built?

Otherwise, for the IEEE 754 decimal forms, the basic (IEEE 754 term) forms
are the 64 bit and 128 bit forms. If there was interest in a Fortran compiler
supporting them as its default types, such that default REAL would be 64 bits,
then it would be useful, as above, to have a way to ask for this, without
asking for a double precision type.

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

<yRs5K.351418$Gojc.341861@fx99.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx99.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.8.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>
<392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>
<2a3c9189-379c-4ea8-8227-eeaaf70ee84en@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <2a3c9189-379c-4ea8-8227-eeaaf70ee84en@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 10
Message-ID: <yRs5K.351418$Gojc.341861@fx99.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: Wed, 13 Apr 2022 00:04:29 -0500
X-Received-Bytes: 1652
 by: Ron Shepard - Wed, 13 Apr 2022 05:04 UTC

On 4/12/22 1:23 PM, gah4 wrote:
> The original subject here is the non-standard REAL*8, but there is the
> standard, non-portable, and way too common REAL(8).

There are thousands of lines of compiler documentation that use REAL(8)
because that is a concise way to describe how the compiler does things.
When new programmers see that documentation, they will mimic it in their
codes. This problem is not going away any time soon.

$.02 -Ron Shepard

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

<bZs5K.838878$aT3.584063@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.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.8.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>
<392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>
<t34lac$utb$1@dont-email.me> <t34m3v$7nk$1@gioia.aioe.org>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <t34m3v$7nk$1@gioia.aioe.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 10
Message-ID: <bZs5K.838878$aT3.584063@fx09.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: Wed, 13 Apr 2022 00:12:38 -0500
X-Received-Bytes: 1587
 by: Ron Shepard - Wed, 13 Apr 2022 05:12 UTC

On 4/12/22 3:06 PM, Phillip Helbig (undress to reply) wrote:
[...]
> Right. DOUBLE is really double the size, since the actual precision,
> however it is measured, can vary, and is usually not double.

And sometimes the precision is more than double. Compare the 24-bit
mantissas in single precision to the 53-bit mantissas in double
precision. Those counts include the implicit hidden bit.

$.02 -Ron Shepard

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

<acc0e1cf-fec6-4cc6-96cd-dba9fb3776a7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5883:0:b0:2e1:c6f9:a12f with SMTP id t3-20020ac85883000000b002e1c6f9a12fmr6043578qta.439.1649829940495;
Tue, 12 Apr 2022 23:05:40 -0700 (PDT)
X-Received: by 2002:a25:ccc9:0:b0:641:2b90:4765 with SMTP id
l192-20020a25ccc9000000b006412b904765mr12413761ybf.44.1649829940255; Tue, 12
Apr 2022 23:05:40 -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, 12 Apr 2022 23:05:40 -0700 (PDT)
In-Reply-To: <07c52bfd-9b23-4672-adf4-ba24cad094b5n@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>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <acc0e1cf-fec6-4cc6-96cd-dba9fb3776a7n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Wed, 13 Apr 2022 06:05:40 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Robin Vowels - Wed, 13 Apr 2022 06:05 UTC

On Wednesday, April 13, 2022 at 4:04:21 AM UTC+10, john.c...@simconglobal.com wrote:
> On Monday, April 11, 2022 at 10:21:33 AM UTC+1, Robin Vowels wrote:
> <snip>> .
> > So does DOUBLE PRECISION, which is STANDARD.
> > .
> I'm not sure that it is, or at least, not in a helpful way. A system with a default 64-bit real number might interpret DOUBLE PRECISION as 128-bit.
..
How many of those do you use?
..
> I agree that standardising REAL*8 would inject a fossil into the language. Perhaps a way forward is to define a new class of PARAMETER for types and kinds, e.g.
>
> PARAMETER,KIND :: REAL_8 = REAL,KIND=KIND(1.0D0)
>
> Then REAL_8 could only be used in a kind specification and would always mean the same thing. This would avoid an error which we found recently in an important code where the user had written an expression of the form:
>
> REAL(dp),PARAMETER :: kappa = 68431_dp
>
> dp was (as a result of SELECTED_REAL_KIND) equal to 8 so the integer was defined as 64-bits and no error occurred on the original ifort compiler. What NAG or FTN95 would have done with it I don't want to know.
..
The design of the kind system in FORTRAN is flawed, and allows errors of this type to pass unnoticed.
The way around it is to have a kind number that is unique for every available kind.
Most manufacturers have circumvented this simple check and invented kind numbers
according to the number of bytes typically employed for the relevant real or integer.
Thus, compilers have the same kind number for both single-precision real [32-bit] and for
a default [32-bit] integer, and so on.
..
In PL/I we can write DECLARE X FLOAT DECIMAL(15);
and DECLARE Y FLOAT DECIMAL (6);
and get the precision that we desire, so that even if a machine
were available that offered only 64-bit reals, we would have
it using hardware floats of 64-bits for variables X and Y.
(Of course, the number of desired digits can be parameterised,
just as in Fortran, so that it would be easy to change.)
As well as the above, one can write DECLARE Z FLOAT BINARY (53);
if it is desired to express the requirement in binary digits.
...
>We don't (yet) know how many more of these are likely to turn up.
> The compiler could issue an error if a parameterised KIND were used as a tag for an integer literal.
..
It could do it now had the compiler writer used unique integers for every kind.
It doesn't need any language changes,.

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

<f112d480-3ecf-4d92-84e0-56176111738dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:f8ca:0:b0:444:41e8:89b1 with SMTP id h10-20020a0cf8ca000000b0044441e889b1mr12249859qvo.22.1649830010697;
Tue, 12 Apr 2022 23:06:50 -0700 (PDT)
X-Received: by 2002:a81:af63:0:b0:2ec:e6a:7281 with SMTP id
x35-20020a81af63000000b002ec0e6a7281mr12710420ywj.170.1649830010522; Tue, 12
Apr 2022 23:06:50 -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, 12 Apr 2022 23:06:50 -0700 (PDT)
In-Reply-To: <t34lac$utb$1@dont-email.me>
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> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <t34lac$utb$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f112d480-3ecf-4d92-84e0-56176111738dn@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Wed, 13 Apr 2022 06:06:50 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Robin Vowels - Wed, 13 Apr 2022 06:06 UTC

On Wednesday, April 13, 2022 at 5:52:47 AM UTC+10, steve kargl wrote:
> John Collins wrote:
>
> > On Monday, April 11, 2022 at 10:21:33 AM UTC+1, Robin Vowels wrote:
> > <snip>> .
> >> So does DOUBLE PRECISION, which is STANDARD.
> >> .
> >
> > I'm not sure that it is, or at least, not in a helpful way. A system with a default 64-bit real number might interpret DOUBLE PRECISION as 128-bit.
> >
> DOUBLE PRECISION is defined by the standard. An entity with
> default REAL kind type occupies one numeric storage unit.
> An entity with DOUBLE PRECISION type occupies two numeric
> storage units. If one numeric storage unit is 64 bits, then
> two would use 128 bits.
..
How many machines are using that offer only 64 bit reals?

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

<33c2adf0-f82f-433a-997e-ea1f89532a83n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:21a7:b0:441:1434:eafd with SMTP id t7-20020a05621421a700b004411434eafdmr33787928qvc.77.1649830155645;
Tue, 12 Apr 2022 23:09:15 -0700 (PDT)
X-Received: by 2002:a0d:ed46:0:b0:2eb:4513:3f4 with SMTP id
w67-20020a0ded46000000b002eb451303f4mr33454735ywe.134.1649830155518; Tue, 12
Apr 2022 23:09:15 -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: Tue, 12 Apr 2022 23:09:15 -0700 (PDT)
In-Reply-To: <yRs5K.351418$Gojc.341861@fx99.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> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <2a3c9189-379c-4ea8-8227-eeaaf70ee84en@googlegroups.com>
<yRs5K.351418$Gojc.341861@fx99.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <33c2adf0-f82f-433a-997e-ea1f89532a83n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Wed, 13 Apr 2022 06:09:15 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 10
 by: Robin Vowels - Wed, 13 Apr 2022 06:09 UTC

On Wednesday, April 13, 2022 at 3:04:34 PM UTC+10, Ron Shepard wrote:
> On 4/12/22 1:23 PM, gah4 wrote:
> > The original subject here is the non-standard REAL*8, but there is the
> > standard, non-portable, and way too common REAL(8).
> There are thousands of lines of compiler documentation that use REAL(8)
> because that is a concise way to describe how the compiler does things.
> When new programmers see that documentation, they will mimic it in their
> codes. This problem is not going away any time soon.
..
How long would it take to write a program to read in a Fortran
program and change REAL(8) to REAL(dp) ?

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

<333b92f5-935a-4ca9-a0be-63fd8786cb30n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a37:9a89:0:b0:69c:29e6:f5de with SMTP id c131-20020a379a89000000b0069c29e6f5demr5674838qke.14.1649830383346;
Tue, 12 Apr 2022 23:13:03 -0700 (PDT)
X-Received: by 2002:a81:98d2:0:b0:2eb:f367:595b with SMTP id
p201-20020a8198d2000000b002ebf367595bmr16777055ywg.379.1649830383203; Tue, 12
Apr 2022 23:13:03 -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, 12 Apr 2022 23:13:03 -0700 (PDT)
In-Reply-To: <t34lac$utb$1@dont-email.me>
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> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <t34lac$utb$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <333b92f5-935a-4ca9-a0be-63fd8786cb30n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Wed, 13 Apr 2022 06:13:03 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Robin Vowels - Wed, 13 Apr 2022 06:13 UTC

On Wednesday, April 13, 2022 at 5:52:47 AM UTC+10, steve kargl wrote:
> John Collins wrote:
>
> > On Monday, April 11, 2022 at 10:21:33 AM UTC+1, Robin Vowels wrote:
> > <snip>> .
> >> So does DOUBLE PRECISION, which is STANDARD.
> >> .
> >
> > I'm not sure that it is, or at least, not in a helpful way. A system with a default 64-bit real number might interpret DOUBLE PRECISION as 128-bit.
> >
> DOUBLE PRECISION is defined by the standard. An entity with
> default REAL kind type occupies one numeric storage unit.
> An entity with DOUBLE PRECISION type occupies two numeric
> storage units. If one numeric storage unit is 64 bits, then
> two would use 128 bits.
..
How many machines are you using that offer 64 bit words for single precision?

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

<ee6e22a7-f32c-4177-9edb-14c032b9ea05n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:c788:0:b0:444:2c7f:4126 with SMTP id k8-20020a0cc788000000b004442c7f4126mr18479735qvj.50.1649835852863;
Wed, 13 Apr 2022 00:44:12 -0700 (PDT)
X-Received: by 2002:a81:8304:0:b0:2ef:1922:c82 with SMTP id
t4-20020a818304000000b002ef19220c82mr7260221ywf.348.1649835852712; Wed, 13
Apr 2022 00:44:12 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!3.eu.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: Wed, 13 Apr 2022 00:44:12 -0700 (PDT)
In-Reply-To: <f112d480-3ecf-4d92-84e0-56176111738dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:1024:fed:77c9:d294;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:1024:fed:77c9:d294
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <t34lac$utb$1@dont-email.me>
<f112d480-3ecf-4d92-84e0-56176111738dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ee6e22a7-f32c-4177-9edb-14c032b9ea05n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 13 Apr 2022 07:44:12 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: gah4 - Wed, 13 Apr 2022 07:44 UTC

On Tuesday, April 12, 2022 at 11:06:52 PM UTC-7, Robin Vowels wrote:

(snip)

> How many machines are using that offer only 64 bit reals?

Cray-1, Cray-1A, Cray-1S, Cray-1M, Cray-X-MP, Cray-Y-MP, Cray-2
Cray-C90 Cray-EL90.

How many of each did they make, so we can add them all up?

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

<5a88e814-3408-451c-90fc-03fcf768ccc4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5bcd:0:b0:2e1:c6c4:ca00 with SMTP id b13-20020ac85bcd000000b002e1c6c4ca00mr6256736qtb.528.1649838241342;
Wed, 13 Apr 2022 01:24:01 -0700 (PDT)
X-Received: by 2002:a81:2485:0:b0:2ec:354d:d45a with SMTP id
k127-20020a812485000000b002ec354dd45amr10222204ywk.213.1649838241152; Wed, 13
Apr 2022 01:24:01 -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: Wed, 13 Apr 2022 01:24:00 -0700 (PDT)
In-Reply-To: <ee6e22a7-f32c-4177-9edb-14c032b9ea05n@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>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <t34lac$utb$1@dont-email.me>
<f112d480-3ecf-4d92-84e0-56176111738dn@googlegroups.com> <ee6e22a7-f32c-4177-9edb-14c032b9ea05n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5a88e814-3408-451c-90fc-03fcf768ccc4n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Wed, 13 Apr 2022 08:24:01 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: Robin Vowels - Wed, 13 Apr 2022 08:24 UTC

On Wednesday, April 13, 2022 at 5:44:14 PM UTC+10, gah4 wrote:
> On Tuesday, April 12, 2022 at 11:06:52 PM UTC-7, Robin Vowels wrote:
>
> (snip)
> > How many machines are using that offer only 64 bit reals?
..
The word "you" was inadvertently omitted from the sentence.
..
> Cray-1, Cray-1A, Cray-1S, Cray-1M, Cray-X-MP, Cray-Y-MP, Cray-2
> Cray-C90 Cray-EL90.
>
> How many of each did they make, so we can add them all up?
..
There is none in use. Any that still exist are museum pieces.

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

<BJB5K.428392$t2Bb.353109@fx98.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!2.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx98.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.8.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>
<392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com>
<t34lac$utb$1@dont-email.me>
<f112d480-3ecf-4d92-84e0-56176111738dn@googlegroups.com>
<ee6e22a7-f32c-4177-9edb-14c032b9ea05n@googlegroups.com>
From: nospam@nowhere.org (Ron Shepard)
In-Reply-To: <ee6e22a7-f32c-4177-9edb-14c032b9ea05n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 31
Message-ID: <BJB5K.428392$t2Bb.353109@fx98.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: Wed, 13 Apr 2022 10:10:25 -0500
X-Received-Bytes: 2571
 by: Ron Shepard - Wed, 13 Apr 2022 15:10 UTC

On 4/13/22 2:44 AM, gah4 wrote:
> On Tuesday, April 12, 2022 at 11:06:52 PM UTC-7, Robin Vowels wrote:
>
> (snip)
>
>> How many machines are using that offer only 64 bit reals?
>
> Cray-1, Cray-1A, Cray-1S, Cray-1M, Cray-X-MP, Cray-Y-MP, Cray-2
> Cray-C90 Cray-EL90.

I'm not sure exactly what this discussion is about, but fortran
compilers on those computers also supported 128-bit reals. Double
precision on those machines was slow, but it was there if you absolutely
needed it.

However, the FPS series of machines, which were also popular in the
1980s, did not support 128-bit arithmetic at all. They only supported
64-bit single precision floating point.

> How many of each did they make, so we can add them all up?

These were not personal computers, so the measure is not how many of the
computers were made, but rather how many programmers and users had
access to them. In my field of computational chemistry, that would be
essentially every active programmer. In the 1980s, one could gain access
in a variety of ways, through government agencies like NSF, NIH, DoD, or
DOE, through state computer access programs, through universities, or
through private employers. Those machines cast a huge shadow in their time.

$.02 -Ron Shepard

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

<t36r8r$d4h$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (steve kargl)
Newsgroups: comp.lang.fortran
Subject: Re: Standardize real*8 as real(kind=real64)?
Date: Wed, 13 Apr 2022 15:46:36 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <t36r8r$d4h$1@dont-email.me>
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com> <f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com> <07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <t34lac$utb$1@dont-email.me> <333b92f5-935a-4ca9-a0be-63fd8786cb30n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Apr 2022 15:46:36 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="abecf67acd932c04ee628646299fa3e8";
logging-data="13457"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mZZJ0zxlOstP5qoPAy//2"
User-Agent: XPN/1.2.6 (Street Spirit ; FreeBSD)
Cancel-Lock: sha1:QhwxjEOi5T+qyk27JwyHzMesdgU=
 by: steve kargl - Wed, 13 Apr 2022 15:46 UTC

Robin Vowels wrote:

> On Wednesday, April 13, 2022 at 5:52:47 AM UTC+10, steve kargl wrote:
>> John Collins wrote:
>>
>> > On Monday, April 11, 2022 at 10:21:33 AM UTC+1, Robin Vowels wrote:
>> > <snip>> .
>> >> So does DOUBLE PRECISION, which is STANDARD.
>> >> .
>> >
>> > I'm not sure that it is, or at least, not in a helpful way. A system with a default 64-bit real number might interpret DOUBLE PRECISION as 128-bit.
>> >
>> DOUBLE PRECISION is defined by the standard. An entity with
>> default REAL kind type occupies one numeric storage unit.
>> An entity with DOUBLE PRECISION type occupies two numeric
>> storage units. If one numeric storage unit is 64 bits, then
>> two would use 128 bits.
> .
> How many machines are you using that offer 64 bit words for single precision?

I can run any code that I have with a 64-bit default real on x86_64 hardware.
The requirements in the Fortran standard do not place restrictions on the
underlying hardware.

% cat o.f90
program o
real a ! default real kind
real*4 b ! nonstanard, but portable, declaration
a = 0.1_4 ! initialization with kind type suffix
b = 3. ! default real kind literal real constant
print '(2I3,1X,G0)', storage_size(a), storage_size(b), a / b
a = exp(1.)
b = 4 * atan(1.)
print '(2I3,1X,G0)', storage_size(a), storage_size(b), a / b
end program

% gfortran11 -o z o.f90 && ./z
32 32 0.333333351E-1
32 32 0.865255952
% gfortran11 -o z o.f90 && ./z
% gfortran11 -o z -fdefault-real-8 o.f90 && ./z
64 32 0.33333333830038704E-1
64 32 0.86525595535432454
% gfortran11 -o z -freal-4-real-8 o.f90 && ./z
64 64 0.33333333333333333E-1
64 64 0.86525597943226507

I'll let you ponder what's going on.

--
steve

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

<dd1f7d59-6fde-4e91-a225-98d400b951b7n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:18a4:b0:2e1:e7a5:98ba with SMTP id v36-20020a05622a18a400b002e1e7a598bamr8331539qtc.424.1649875280169;
Wed, 13 Apr 2022 11:41:20 -0700 (PDT)
X-Received: by 2002:a05:6902:c8:b0:633:ee0c:bca2 with SMTP id
i8-20020a05690200c800b00633ee0cbca2mr258673ybs.82.1649875280027; Wed, 13 Apr
2022 11:41:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.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: Wed, 13 Apr 2022 11:41:19 -0700 (PDT)
In-Reply-To: <33c2adf0-f82f-433a-997e-ea1f89532a83n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=195.80.8.170; posting-account=xDRY5QoAAAC2FYqWewp8nrpnVLhp0KxM
NNTP-Posting-Host: 195.80.8.170
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <2a3c9189-379c-4ea8-8227-eeaaf70ee84en@googlegroups.com>
<yRs5K.351418$Gojc.341861@fx99.iad> <33c2adf0-f82f-433a-997e-ea1f89532a83n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dd1f7d59-6fde-4e91-a225-98d400b951b7n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: john.collins@simconglobal.com (John Collins)
Injection-Date: Wed, 13 Apr 2022 18:41:20 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 14
 by: John Collins - Wed, 13 Apr 2022 18:41 UTC

On Wednesday, April 13, 2022 at 7:09:17 AM UTC+1, Robin Vowels wrote:
> .
> How long would it take to write a program to read in a Fortran
> program and change REAL(8) to REAL(dp) ?

If the original code didn't have odd space characters, continuation lines and comments in silly places very little time at all. But I think that an issue here is that dp must be defined somewhere, and the definition added to every routine. Inserting an INCLUDE file or USE statement into every Fortran sub-program is much more work than a 1-line sed script.

We have done all this. But I think a simple, unambiguous declaration which didn't have any associated complexities would be useful. To that end REAL*8 is the best we have got, it works everywhere (at least that I know of) and doesn't need to be in the standard if everyone understands it.

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

<18c52236-852f-4488-afc5-ec6729b15fe5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:8e0b:0:b0:435:1779:7b22 with SMTP id v11-20020a0c8e0b000000b0043517797b22mr890570qvb.63.1649889225481;
Wed, 13 Apr 2022 15:33:45 -0700 (PDT)
X-Received: by 2002:a0d:ed46:0:b0:2eb:4513:3f4 with SMTP id
w67-20020a0ded46000000b002eb451303f4mr1029976ywe.134.1649889225342; Wed, 13
Apr 2022 15:33:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.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: Wed, 13 Apr 2022 15:33:45 -0700 (PDT)
In-Reply-To: <BJB5K.428392$t2Bb.353109@fx98.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:e500:e0e:df22:1fd7;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:e500:e0e:df22:1fd7
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <t34lac$utb$1@dont-email.me>
<f112d480-3ecf-4d92-84e0-56176111738dn@googlegroups.com> <ee6e22a7-f32c-4177-9edb-14c032b9ea05n@googlegroups.com>
<BJB5K.428392$t2Bb.353109@fx98.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <18c52236-852f-4488-afc5-ec6729b15fe5n@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 13 Apr 2022 22:33:45 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 61
 by: gah4 - Wed, 13 Apr 2022 22:33 UTC

On Wednesday, April 13, 2022 at 8:10:29 AM UTC-7, Ron Shepard wrote:

(snip, I wrote)

> > Cray-1, Cray-1A, Cray-1S, Cray-1M, Cray-X-MP, Cray-Y-MP, Cray-2
> > Cray-C90 Cray-EL90.

> I'm not sure exactly what this discussion is about, but fortran
> compilers on those computers also supported 128-bit reals. Double
> precision on those machines was slow, but it was there if you absolutely
> needed it.
In the 1970's (mostly CDC) and 1980's (CDC and Cray), porting
programs was complicated if you wanted a 64 bit (more or less)
data type. That is, single precision on some machines, double
on others. (In addition, some other constants, sometimes many
other constants, would change between machines.)

One that I think I remember, from the card days, was cards for all
the different possibilities, each with a C in column 80. You then
reverse the card in the deck, so the C is in column 1, for those you
don't want to use.

In any case, REAL*8 suggests that you want about 64 bits,
and maybe about 53 bits of significand, on any machine.

It does not suggest that you want double precision on hardware
with a 60 or 64 bit single precision.

There are ways to do this within the standard, which take a lot
of typing, and also ways that are non-standard.

If you manage to USE the appropriate module, at the right time,
there is REAL64 and C_DOUBLE.

REAL(SELECTED_REAL_KIND(12))

might be about right, but is a lot to write. It is difficult to do a simple
string substitution without problems with continuations and such.

REAL(8) is shorter, but the standard does not give specific
KIND values, so one can't reliably expect any specific type,
or even that such type exists.

REAL*8 is easy to type, and does not suggest double precision on hardware
with a longer single precision type.

> However, the FPS series of machines, which were also popular in the
> 1980s, did not support 128-bit arithmetic at all. They only supported
> 64-bit single precision floating point.

Interesting. Since Fortran compilers were, as well as I know, not hosted
on the FPS machine, they might avoid the standard requirement for
a double precision type.

As well as I know it, C does not require or suggest that (double)
is twice the size, or otherwise more precision, than (float).
Systems with a 64 bit (float) can also have a 64 bit (double).

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

<6f987840-b018-438e-b546-01e5fbad112dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:1cc5:b0:2ed:cba0:3f0e with SMTP id bc5-20020a05622a1cc500b002edcba03f0emr89086qtb.365.1649896690662;
Wed, 13 Apr 2022 17:38:10 -0700 (PDT)
X-Received: by 2002:a81:ec07:0:b0:2ca:287c:6c04 with SMTP id
j7-20020a81ec07000000b002ca287c6c04mr135145ywm.169.1649896690527; Wed, 13 Apr
2022 17:38:10 -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: Wed, 13 Apr 2022 17:38:10 -0700 (PDT)
In-Reply-To: <dd1f7d59-6fde-4e91-a225-98d400b951b7n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:e500:e0e:df22:1fd7;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:e500:e0e:df22:1fd7
References: <c56c4a4c-161f-4608-9a30-756894030f29n@googlegroups.com>
<f520ba36-83fe-4ba1-a444-64c82a92559cn@googlegroups.com> <392becf1-044b-4800-b85c-1d744e91a55cn@googlegroups.com>
<07c52bfd-9b23-4672-adf4-ba24cad094b5n@googlegroups.com> <2a3c9189-379c-4ea8-8227-eeaaf70ee84en@googlegroups.com>
<yRs5K.351418$Gojc.341861@fx99.iad> <33c2adf0-f82f-433a-997e-ea1f89532a83n@googlegroups.com>
<dd1f7d59-6fde-4e91-a225-98d400b951b7n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6f987840-b018-438e-b546-01e5fbad112dn@googlegroups.com>
Subject: Re: Standardize real*8 as real(kind=real64)?
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 14 Apr 2022 00:38:10 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 22
 by: gah4 - Thu, 14 Apr 2022 00:38 UTC

On Wednesday, April 13, 2022 at 11:41:22 AM UTC-7, john.c...@simconglobal.com wrote:
> On Wednesday, April 13, 2022 at 7:09:17 AM UTC+1, Robin Vowels wrote:
> > How long would it take to write a program to read in a Fortran
> > program and change REAL(8) to REAL(dp) ?

> If the original code didn't have odd space characters, continuation lines
> and comments in silly places very little time at all.
> But I think that an issue here is that dp must be defined somewhere,
> and the definition added to every routine. Inserting an INCLUDE file or
> USE statement into every Fortran sub-program is much more work
> than a 1-line sed script.

I would probably use AWK, and it is likely more than one line.

I am not sure at all how easy it is to find the right place to put
in the USE statement (for a constant that is in a module)
or PARAMETER statement for one that isn't.

And then you need to be sure that there isn't already one,
or that (ugh) the name could already have another use.


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

Pages:12345
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor