newbie willing to contribute...
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Nov 7 19:52:00 GMT 2005
On Mon, Nov 07, 2005 at 12:05:35PM -0600, Erik Schnetter wrote:
> On Nov 7, 2005, at 12:01:09, Steve Kargl wrote:
> >http://gcc.gnu.org/onlinedocs/gcc-3.4.4/g77/Complex-
> >Intrinsic.html#index-Complex-intrinsic-846
>
> What about introducing an intrinsic gfortran_good_real_kind(a,b) that
> looks as the types and kinds of a and b (which can be integer, real,
> or complex) and finds a "good" real kind that corresponds to a and b,
> according to the rules laid out in the web page above? Than you can say
>
> complex(a,b) = cmplx(a,b,gfortran_good_real_kind(a,b))
>
> and have a much easier implementation. And since the routine is
> codified in the compiler, the conversion rules are also clear.
>
This is essentially what gfc_resolve_complex().
--
Steve
More information about the Fortran
mailing list