From: robin.vowels@gmail.com
Subject: Re: getting same output as gfortran, long_float
Date: Sun, 3 May 2015 17:15:15 -0700 (PDT)
Date: 2015-05-03T17:15:15-07:00 [thread overview]
Message-ID: <a2331d9f-e194-4cd4-a42e-28a3b00a9c08@googlegroups.com> (raw)
In-Reply-To: <142zdljlf0w57.1xh4g0wxv88y8.dlg@40tude.net>
On Friday, May 1, 2015 at 5:45:23 PM UTC+10, Dmitry A. Kazakov wrote:
> On Fri, 01 May 2015 02:32:27 -0500, Nasser M. Abbasi wrote:
>
> > Actually, it is much more complicated. The way I wrote it
> > above is not the optimal way. One is supposed to call
> > SELECTED_REAL_KIND(n,e) requesting n significant digits
> > and e number of digits in the exponent (e is optional).
>
> Huh, they finally learned something after half of a century! (:-))
>
> > i.e. one is supposed to write
> >
> > SELECTED_REAL_KIND(8,3) specifies real type of
> > (+-) 0.xxxxxxxx * 10 ^(+-)xxx
> >
> > If the compiler does not support this, then the compile
> > will fail. This is in a way similar to Ada's
> >
> > type my_type is digits n;
>
> Yes, though Ada also mandates that for the precision specified, the
> implementation must guarantee certain accuracy of operations. Maybe in the
> following 50 years FORTRAN will get that idea as well.
>
> > And it is supposed to be portable way of doing things, vs.
> > using Real*16.
>
> Actually REAL*16 is exactly portable.
No it's not.
Some compilers treat that is an error.
That form is non-standard.
SELECTED_REAL_KIND or a similar modern form is how
precision may be specified in a portable manner.
next prev parent reply other threads:[~2015-05-04 0:15 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 21:17 getting same output as gfortran, long_float Nasser M. Abbasi
2015-04-30 22:08 ` Dmitry A. Kazakov
2015-04-30 22:11 ` Dmitry A. Kazakov
2015-04-30 22:37 ` Nasser M. Abbasi
2015-04-30 22:53 ` Nasser M. Abbasi
2015-05-01 7:22 ` Jacob Sparre Andersen
2015-05-01 1:12 ` Nasser M. Abbasi
2015-05-01 6:52 ` Dmitry A. Kazakov
2015-05-01 7:32 ` Nasser M. Abbasi
2015-05-01 7:45 ` Dmitry A. Kazakov
2015-05-04 0:15 ` robin.vowels [this message]
2015-05-04 7:21 ` Dmitry A. Kazakov
2015-05-04 8:53 ` robin.vowels
2015-05-04 10:18 ` Dmitry A. Kazakov
2015-05-04 13:45 ` robin.vowels
2015-05-04 14:47 ` Dmitry A. Kazakov
2015-05-07 2:01 ` robin.vowels
2015-05-01 23:24 ` Dennis Lee Bieber
2015-05-04 0:09 ` robin.vowels
2015-05-01 7:01 ` Dmitry A. Kazakov
2015-05-04 0:42 ` robin.vowels
2015-04-30 22:12 ` Jeffrey R. Carter
2015-04-30 22:27 ` Qun-Ying
2015-05-01 0:59 ` Dennis Lee Bieber
2015-04-30 22:32 ` Nasser M. Abbasi
2015-05-01 1:16 ` Jeffrey R. Carter
2015-05-01 1:40 ` Nasser M. Abbasi
2015-05-01 7:47 ` Jacob Sparre Andersen
2015-05-01 15:39 ` Waldek Hebisch
2015-05-01 17:27 ` Nasser M. Abbasi
2015-05-01 18:03 ` Nasser M. Abbasi
2015-05-04 0:51 ` robin.vowels
2015-05-04 0:47 ` robin.vowels
2015-05-01 8:21 ` Simon Wright
2015-05-01 11:55 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox