Re: Rounding off double precision
- From: Dave Seaman <dseaman@xxxxxxxxxxxx>
- Date: Mon, 31 Mar 2008 18:00:06 +0000 (UTC)
On Mon, 31 Mar 2008 17:45:41 +0100, Les wrote:
"Bamm" <bammster@xxxxxxxxx> wrote in message
news:eab4fbe9-3cf4-4015-9a87-e5e9a872f808@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Sigh. The text you quoted above reads "creates a literal constant
with the double-precision value". The literal constant is
"3.141592653589793238d0" and is a double precision value. The fact
that it is being assigned to a single-precision parameter is something
different. A parameter is not a literal constant and vice-versa.
So how do you declare a constant in Fortran? I thought parameter was
the way constants were defined in Fortran, but if there is a better
way, I'd like to try it.
you would use something like :
double precision, parameter :: PI = 3.14159.......d0
integer, parameter :: ITYPE = 1
and so on
That, of course, is the preferred Fortran 90 syntax, but the Fortran 77
method
double precision pi
parameter (pi = 3.14159265358979d0)
also has the desired effect and is closer to what was originally asked.
--
Dave Seaman
Court affirms Judge Yohn's ruling.
<http://www.ipsnews.net/news.asp?idnews=41761>
.
- References:
- Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: Richard Maine
- Re: Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: e p chandler
- Re: Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: glen herrmannsfeldt
- Re: Rounding off double precision
- From: Charles Coldwell
- Re: Rounding off double precision
- From: glen herrmannsfeldt
- Re: Rounding off double precision
- From: Chip Coldwell
- Re: Rounding off double precision
- From: Dave Seaman
- Re: Rounding off double precision
- From: Chip Coldwell
- Re: Rounding off double precision
- From: Bamm
- Re: Rounding off double precision
- From: Les
- Rounding off double precision
- Prev by Date: Re: Press any key to continue?
- Next by Date: Re: Rounding off double precision
- Previous by thread: Re: Rounding off double precision
- Next by thread: Re: Rounding off double precision
- Index(es):
Relevant Pages
|
|