public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Re: fortran - changing precision of real numbers
@ 2008-03-14 18:47 Timothy C Prince
  0 siblings, 0 replies; only message in thread
From: Timothy C Prince @ 2008-03-14 18:47 UTC (permalink / raw)
  To: burlen; +Cc: dima.sorkin, gcc-help



-----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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-14 18:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-14 18:47 Re: fortran - changing precision of real numbers Timothy C Prince

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).