From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 01 May 2015 18:24:03 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: getting same output as gfortran, long_float Date: Fri, 01 May 2015 19:24:07 -0400 Organization: IISS Elusive Unicorn Message-ID: References: <1kxou0nloqg9c$.1x0itzgdrlosm$.dlg@40tude.net> <1i8x3r1feyzkt$.j85il7e3wpv9.dlg@40tude.net> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.68.176.228 X-Trace: sv3-6MUgPdCLevqyP7LoytGBpIhwSzWRaQ5n2RmD2hr9XlXTL1Gaz99ZxiitZqkj535r7g00nfb53knUGE/!f7+QeIMTqljoKCZMsdtkGs0q/82MyE0tzkruOoZX8kNm4ZH4KmxmdVfddFV4xnEfM2u8SuAxhBs4!SEG/EgHozuA3En9aWNWlmnfBgKyP X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2740 Xref: number.nntp.giganews.com comp.lang.ada:192997 Date: 2015-05-01T19:24:07-04:00 List-Id: On Fri, 1 May 2015 08:52:43 +0200, "Dmitry A. Kazakov" 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/