Re: CMPLX and constant folding
  Home FAQ Contact Sign in
Your Ad Here
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: CMPLX and constant folding         

Group: comp.lang.fortran · Group Profile
Author: John Harper
Date: May 11, 2008 17:33

In article comcast.com>,
James Van Buskirk comcast.net> wrote:
>"FX" alussinan.org> wrote in message
>news:g01ij1$11gf$1@nef.ens.fr...
>
>There is a buglet in the description of CMPLX in the standard:
>
>"If X is complex, it is as if X were real with the value REAL(X,KIND)
>and Y were present with the value AIMAG(X,KIND)."
>
>Nice concise prose, but AIMAG doesn't take a KIND optional agument.
>Maybe REAL(AIMAG(X),KIND) ?

That buglet seemed to have been squashed in the f95 standard Working
Draft of October 21, 1997, which says AIMAG(X), but it reappeared in
the f2003 Working Draft of May 10, 2004 and in the f2008 Working Draft
of 5th January 2007 :-(

But AIMAG has another problem: it is both generic and specific, but the
specific version is a default real function of a default complex
argument only. Pity there isn't a specific DAIMAG intrinsic function,
not to mention DCABS, DCCOS, DCEXP, DCLOG, DCONJ, DCSIN, DCSQRT.

-- John Harper, School of Mathematics, Statistics and Computer Science,
Victoria University, PO Box 600, Wellington 6140, New Zealand
e-mail john.harper@vuw.ac.nz phone (+64)(4)463 6780 fax (+64)(4)463 5045
no comments
diggit! del.icio.us! reddit!
Your Ad Here