newbie willing to contribute...

Richard E Maine Richard.Maine@nasa.gov
Mon Nov 7 17:31:00 GMT 2005


On Nov 7, 2005, at 5:31 AM, Pierre-Matthieu anglade wrote:
[about a COMPLEX intrinsic]

> I haven't been able to find the spec at the j3 fortran site...
> This is a problem because I don't know what complex(double , real) or
> complex(real, double) is suppose to output.
> Does anyone knows about this?

You didn't find the spec there because it isn't part of the Fortran 
standard. There are people who have proposed making such a thing 
standard (and I tend to think that a good idea), but it isn't now. Thus 
there is no authoritative spec.

The first part of any such project would be to write such a spec. As 
you note, there are cases where it isn't completely obvious. Other 
interesting cases include

   complex(longish_integer, longish_integer)

where the integer is long enough to loose precision in real. Should 
this promote to double? And don't forget cases mixing integer and real.

It isn't as though it is horribly difficult to spec this all out, but 
there are one or two philosophical choices to be made. One would 
probably want to look at other implementations of such things to at 
least try for some commonality and improve the odds that, if it ever is 
standardized, you won't end up with an incompatibility to work around.

-- 
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                             |        -- Mark Twain



More information about the Fortran mailing list