From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: getting same output as gfortran, long_float
Date: Fri, 01 May 2015 19:24:07 -0400
Date: 2015-05-01T19:24:07-04:00 [thread overview]
Message-ID: <l828katk4752ojmi5orh8oadco2o3sdpbt@4ax.com> (raw)
In-Reply-To: 1i8x3r1feyzkt$.j85il7e3wpv9.dlg@40tude.net
On Fri, 1 May 2015 08:52:43 +0200, "Dmitry A. Kazakov"
<mailbox@dmitry-kazakov.de> declaimed the following:
>On Thu, 30 Apr 2015 20:12:47 -0500, Nasser M. Abbasi wrote:
>
>> I found that gfortran can do 128 bit floating point without
>> the use of the compiler switch -fdefault-real-8. Which will
>> map to similar thing as the above Ada construct:
>>
>> -------------------
>> PROGRAM foo
>> IMPLICIT NONE
>> REAL(KIND = 16) :: x !-- kind=16 tells it is double quad
>> x = 12.0D0 * 0.0001D0/(1.0D0 * (1.0D0 - 0.1D0)**4 )
>> PRINT *, x
>> END PROGRAM
>> ------------------
>
>I didn't use FORTRAN for decades, but in good old FORTRAN-IV you declare
>specific lengths using T*n, e.g.
>
>INTEGER*2
>REAL*4
>REAL*8
>
Even that wasn't FORTRAN-IV as I was taught it... F-IV/F66 had
INTEGER
REAL
DOUBLE PRECISION
where INTEGER and REAL used the same size storage.
The *x notation showed up in extended F-77 versions, as I recall -- and
VAX systems really confused matters with at least four variants (two
different double precision systems; the "normal" one being a single
precision REAL with an additional 32 bits of mantissa [so one could easily
truncate if passing to a single precision function] {F and D float}, the
other with an extended exponent and reduced precision {G float}, and quad
precision {H float})
The OP is using Fortran-90/95 notation.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
next prev parent reply other threads:[~2015-05-01 23:24 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
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 [this message]
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