Re: compilation problem with module function interface definition
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 21:35:25 GMT
glen herrmannsfeldt wrote:
.....
> It does complicate some algorithms slightly, though.
....
> But consider that you might want to print out the number.
> With seven decimal digits you can print out all seven with the
> relative spacing one in the last digit. Now consider printing
> the binary number in decimal. The unfair spacing is always
> there for decimal formatted output. (Though with the traditional
> format with a leading zero (without a P descriptor) it is even
> one digit worse.)
But consider that most programs only output values after quite
a number of computational steps. Those will be more complicated
to get right in decimal than binary, and more complex to analyze.
You should pick the form of floating point that best suits the majority
of your needs, rather than just trying to satisfy one usually trivial
issue.
Getting back to the aspect of this issue that led to this discussion:
The value I see in having a decimal float KIND is that literals could
default to that KIND without inherent loss of precision. Given the
example of this thread:
real(myKind) :: x, y
...
x = 1.23
Here, if the literal is of a type of KIND that loses no precision is
and of itself, then it doesn't matter what KIND I change myKind to
select, I will get an approximation of appropriate precision to
be stored in X. The problem arises in mixed KIND arithmetic:
x = 1.23 * y
Here, if the KIND of the product is required to be the same as the
KIND of the literal I think it's not the best choice for the majority
of cases.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
.
- References:
- compilation problem with module function interface definition
- From: Phony Account
- Re: compilation problem with module function interface definition
- From: Richard E Maine
- Re: compilation problem with module function interface definition
- From: Phony Account
- Re: compilation problem with module function interface definition
- From: Richard E Maine
- Re: compilation problem with module function interface definition
- From: glen herrmannsfeldt
- Re: compilation problem with module function interface definition
- From: James Giles
- Re: compilation problem with module function interface definition
- From: glen herrmannsfeldt
- Re: compilation problem with module function interface definition
- From: James Giles
- Re: compilation problem with module function interface definition
- From: glen herrmannsfeldt
- Re: compilation problem with module function interface definition
- From: James Giles
- Re: compilation problem with module function interface definition
- From: glen herrmannsfeldt
- compilation problem with module function interface definition
- Prev by Date: Re: compilation problem with module function interface definition
- Next by Date: Re: why doesn't this compile ?
- Previous by thread: Re: compilation problem with module function interface definition
- Next by thread: Re: compilation problem with module function interface definition
- Index(es):
Relevant Pages
|