I suggest that when the x and y arguments of cmplx are both of a real type other than default real or that when only x is present and is not a default real that it be obsolescent to not specify the kind argument of cmplx. The expression
cmplx(1.0d0,1.0d0)
does not produce a double precision complex number, although a casual reader may think it does. It's anomalous, because other intrinsics such as sin or sum return reals of the same kind as the argument. To avoid errors one should be forced to write
cmplx(1.0d0,1.0d0,kind=some_kind)
It will be not be obsolescent to write
cmplx(1.0,1.0)
since no silent conversion is performed here.
Starting from scratch, cmplx(1.0d0,1.0d0) should return a double precision complex value, but I am wary of changing the meaning of valid code.
I suggest that when the x and y arguments of
cmplx
are both of a real type other than default real or that when only x is present and is not a default real that it beobsolescent
to not specify thekind
argument ofcmplx
. The expressioncmplx(1.0d0,1.0d0)
does not produce a double precision complex number, although a casual reader may think it does. It's anomalous, because other intrinsics such as
sin
orsum
return reals of the samekind
as the argument. To avoid errors one should be forced to writecmplx(1.0d0,1.0d0,kind=some_kind)
It will be not be obsolescent to write
cmplx(1.0,1.0)
since no silent conversion is performed here.
Starting from scratch,
cmplx(1.0d0,1.0d0)
should return a double precision complex value, but I am wary of changing the meaning of valid code.