Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!apple!sun-barr!newstop!sun!amdahl!key!sjc From: sjc@key.COM (Steve Correll) Newsgroups: comp.lang.fortran Subject: Re: FORTRAN 8X PRECISION Message-ID: <1212@key.COM> Date: 11 Nov 89 19:40:36 GMT References: <7563@xenna.Xylogics.COM> <50500166@uxe.cso.uiuc.edu> Organization: Key Computer Labs, Fremont, CA Lines: 29 Steve Correll (sjc@key.COM) writes: >2. Another alternative mentioned earlier, the PARAMETER statement, doesn't > solve the problem either. In the following example (please correct me if I'm > wrong) the standard permits the compiler to convert "1e50" from text to real > and then to doubleprecision, possibly overflowing during the intermediate > step. When you change REAL to DOUBLEPRECISION in IMPLICIT statements, you > still need to change "e" to "d" in the exponents in PARAMETER statements. > > implicit doubleprecision (d) > parameter (d = 1e50) In article <50500166@uxe.cso.uiuc.edu>, hirchert@uxe.cso.uiuc.edu writes: > Half right. The trick is to use a D exponent in the first place. If the > constant being defined is of type REAL, it will converted. If it is of type > DOUBLE PRECISION, you've supplied full accuracy. Sorry, I didn't make myself clear. Once you've changed the exponents from "e" to "d", you can indeed leave them alone henceforth as you switch between "real" and "doubleprecision". But that's irrelevant if you're faced with a large existing program which used "e" in the first place. If it's not too arduous and error-prone to go find all the "e"s and change them to "d"s, then it's not too arduous and error-prone to append "_my_precision" in the fashion of F88 (though you may debate the aesthetics thereof). I perceive that many users feel that both approaches are too arduous and error-prone, and would prefer an IMPLICIT facility for literal constants. -- ...{sun,pyramid}!pacbell!key!sjc Steve Correll