From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23190 invoked by alias); 14 Mar 2008 18:47:35 -0000 Received: (qmail 23180 invoked by uid 22791); 14 Mar 2008 18:47:35 -0000 X-Spam-Check-By: sourceware.org Received: from 238.122.8.72.dhcp.mstarmetro.net (HELO psmtp-send.myrealbox.com) (72.8.122.238) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Mar 2008 18:47:04 +0000 Received: from tprince [143.183.121.2] by myrealbox.com with NetMail ModWeb Module; Fri, 14 Mar 2008 18:47:01 +0000 Subject: Re: Re: fortran - changing precision of real numbers Reply-To: tprince@computer.org From: "Timothy C Prince" To: burlen@apollo.sr.unh.edu CC: dima.sorkin@gmail.com, gcc-help@gcc.gnu.org Date: Fri, 14 Mar 2008 18:47:00 -0000 X-Mailer: NetMail ModWeb Module X-Sender: tprince MIME-Version: 1.0 Message-ID: <1205520421.4109983ctprince@myrealbox.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00138.txt.bz2 -----Original Message----- From: burlen To: Dima Sorkin 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 gfort= ran. Tim Prince