This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Re: fortran - changing precision of real numbers
- From: "Timothy C Prince" <tprince at myrealbox dot com>
- To: burlen at apollo dot sr dot unh dot edu
- Cc: dima dot sorkin at gmail dot com, gcc-help at gcc dot gnu dot org
- Date: Fri, 14 Mar 2008 18:47:01 +0000
- Subject: Re: Re: fortran - changing precision of real numbers
- Reply-to: tprince at computer dot org
-----Original Message-----
From: burlen <burlen@apollo.sr.unh.edu>
To: Dima Sorkin <dima.sorkin@gmail.com>
Date: Wed, 12 Mar 2008 16:09:59 -0400
Subject: Re: fortran - changing precision of real numbers
top-post elided
Dima Sorkin wrote:
> Hi.
> I have a code written in single-precision (MIEV0.f by Wiscombe).
> I want to compile and run it in double-precision.
>
> Is there some compiler options in gfortran ?
> (in g77 ? (if I will have to use old computer))
>
> In case the answer is 'no', is the following sufficient:
> 1) change 'REAL' type to 'DOUBLE PRECISION' globally in the code.
> 2) change all calls to 'REAL(..)' function by 'DBLE(..)'.
>
http://gcc.gnu.org/onlinedocs/
for gfortran:
-fdefault-real-8
Set the default real type to an 8 byte wide type.
g77 had no such option.
It's difficult to imagine an old computer which could run g77 but not gfortran.
Tim Prince