I pretty much agree with Richard's comments. But I think there is
a stronger case for saying that complex must mimic real.
In 4.3.1.2 (32:35-36) it says "A processor shall provide two OR MORE
approximation methods that define ... type real". I don't see
anything that says the "or more" part is an extension. I'd say
it must follow the same rules as the "two" approximations.
In 4.3.1.3 (34:22-23) it says "Each approximation method ... of
type real shall be available for ... type complex." Seems to me
a standard conforming compiler must support all of them for complex.
There is one popular (well I like it) test suite that uses the same
named constants for both REAL and COMPLEX variables and it
works with "single", "double", and also "quad" on machines which
support 3 precisions.
You could try something like
real(10) x, y
complex(10) z
x = 3.14
z = x
y = z
if (x .ne. y) print "complex(100 ain't real(10)"
that might tell you something.
Dick Hendrickson
Dan Nagle wrote:
>
> Hello,
>
> Can anyone think of a way to tell,
> from a running program, whether the processor
> supports a complex kind for each real kind?
>
> I know Fortran processors are supposed to have
> a complex for each real, but a language-lawyer :-)
> might argue that a third real kind is an
> extension, not requiring a corresponding complex.
>
> For example, a complex corresponding to real(10)
> on an Intel processor (the register variable)
> might not be present.
>
> This is for possible use in make_processor_model.
>
> --
> Cheers!
>
> Dan Nagle, eMail: [log in to unmask]
> Purple Sage Computing Solutions, Inc.,
> 12142 Purple Sage Ct., Reston VA 20194
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|