Re: compilation problem with module function interface definition



In article <u4vce.162973$cg1.95547@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"James Giles" <jamesgiles@xxxxxxxxxxxxxxxx> wrote:

> Mixed mode between binary and decimal
> of approximately the same precisions should probably result in
> binary for best results.
>
> Unfortunately, Fortran makes the reverse decision.

I'd suggest that, assuming compilers supporting both both binary and
decimal floats start appearing, it would be wise for users to avoid such
mixed-mode operations. I have no great problem with mixed-mode
operations between real and integer or between different precisions of
real, because I regard their interpretation in most situations as
reasonably intuitive. In edge cases or special situations, one can
always make the conversions explicit. I realize that some people prefer
to avoid all mixed-mode operations, but I'm not of that camp.

For mixed-mode between binary and decimal, however, I don't find the
interpretation nearly as intuitive. Yes, I can dig out the standard,
read the fine print, and deduce the answer for specific cases, but
that's not what I call intuitive. Likewise, I can analyze the precision
along the lies that Giles did and come up with an answer like his, but I
don't call that intuitive either. (I didn't say it was wrong - just
that it isn't intuitive; I don't call something that requires me to drag
out a calculator or a pad of paper to figure on to be intuitive). I'd
say that if I needed to go to that much trouble to figure out how I
wanted it to work in a particular case, that it would be better for me
to go ahead and make my intention explicit to the compiler instead of
hoping that the compiler does it the way I wanted. Proving a theorem
that the standard requires the compiler to do it the way I wanted
doesn't seem great either.

I'm not arguing anything about whether the standard did or did not do
the best job of specifying the mixed mode behavior for cases like this.
I'm just suggesting what I think a user should do.

--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.