Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: CMPLX and c...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 10 Topic 8218 of 8767
Post > Topic >>

Re: CMPLX and constant folding

by nospam@[EMAIL PROTECTED] (Richard Maine) May 11, 2008 at 05:55 PM

John Harper <harper@[EMAIL PROTECTED]
> wrote:

> 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.

This "problem" is pretty much universal to all the intrinsics. You won't
find *ANY* new specifics for them. The number of specific names required
would be huge, not to speak of the fact that even what specifics were
appropriate would be compiler-dependent (because the number of kinds is
compiler dependent, and it would be problematic if changing kinds meant
that you no longer had a specific).

Sorry... (well, not very), but specific intrinsics have been on the way
out since f77. Using specific intrinsic names is basically an f66
practice. Adding zillions of new specific intrinsics just to sup****t f66
styles isn't realistically going to happen. The number of places where
one actually needs a specific name for an intrinsic is miniscule to the
point of being essentially nonexistant. How many times do you actually
pass an intrinsic as an actual argument? Well, somehow I might believe a
non-zero answer from one or two people here, but if so, they are in a
pretty small minority.

And if you happen to have such an exceedingly rare case, it is usually
easy enough to work around by making a user-written specific procedure
as a wrapper. The number of cases where that workaround isn't viable
(because user procedures can't do some of the things that intrinsic ones
can) is even more rare. If you have such an unusual rarity, I'm afraid
that the cost benefit of throwing a zillion specifics into the standard
just isn't there.

For the most part, the answer is "don't do that."

-- 
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain
 




 10 Posts in Topic:
CMPLX and constant folding
"James Van Buskirk&q  2008-05-09 03:11:11 
Re: CMPLX and constant folding
"FX" <couder  2008-05-09 09:43:00 
Re: CMPLX and constant folding
glen herrmannsfeldt <g  2008-05-09 04:29:15 
Re: CMPLX and constant folding
"FX" <couder  2008-05-09 13:12:01 
Re: CMPLX and constant folding
"James Van Buskirk&q  2008-05-09 10:02:22 
Re: CMPLX and constant folding
harper@[EMAIL PROTECTED]   2008-05-12 12:33:33 
Re: CMPLX and constant folding
nospam@[EMAIL PROTECTED]   2008-05-11 17:55:07 
Re: CMPLX and constant folding
"James Van Buskirk&q  2008-05-09 18:24:04 
Re: CMPLX and constant folding
"FX" <couder  2008-05-11 17:16:41 
Re: CMPLX and constant folding
"James Van Buskirk&q  2008-05-11 21:56:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 12:56:12 CDT 2008.