Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Intrinsic function for dp vs sp?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
glen herrmannsfeldt  
View profile  
 More options Sep 11 2012, 12:43 pm
Newsgroups: comp.lang.fortran
From: glen herrmannsfeldt <g...@ugcs.caltech.edu>
Date: Tue, 11 Sep 2012 16:43:07 +0000 (UTC)
Local: Tues, Sep 11 2012 12:43 pm
Subject: Re: Intrinsic function for dp vs sp?

Richard Maine <nos...@see.signature> wrote:

(snip, I wrote)

>> The standard has it under
>>   "Specific names for standard intrinsic functions"
>> Doesn't say anything about archaic.

(snip)

> Likely the only reason the standard doesn't say it is archaic is because
> the standard doesn't say such things at all. There was a category of
> deprecated features once proposed for f90, but it got dropped as too
> controversial.

There is still a note in F2008 on the small typeface for depracated
features. I don't know that there are actually any with that typeface.

As far as I can tell, the specific names section doesn't use the
depracated typeface.

> Any recommendation about whether something should be avoided as archaic
> (or deprecated if one prefers that term) is a personal one rather than
> one in the standard. Just because the standard doesn't have such
> recommendations doesn't mean they can't be darned good ideas.

Still, compiler documentation is different from ones personal
opinion in a newsgroup post.

> I personally consider things like DCOS to be archaic, and I recommend
> never using it. I'm not going to waffle by saying "rarely". I mean that
> "never" literally. Yes, I know you can invent a case where one could use
> it. But such things are so rare that I do not recall ever once seeing
> such a case in code "in the wild", as opposed to code where people are
> trying to illustrate how it might be used. I supose my recollection
> could be faulty, but again I mean that "not once" literally.

Yes. The need for numerically integrating cos() should be pretty
small. I can imagine it in a test program, maybe testing a numerical
integration routine. I suppose I could even imagine adding it to
a test suite for an integration or minimization routine.

> That puts it in the category of things whose utility is so low that I
> believe one is better off ignoring completely. If you do happen to know
> about the feature, pretend that you don't anyway. The only times you
> even need to know that the feature exists is when you are reading old
> codes.... or when you are explaining to someone why they should be
> ignoring the feature.

Not only is it still in the standard, but the bullet to indicate
which functions can't be used as actual arguments is still there.
(Cos doesn't have one.)

> If there ever actually was a reason to pass a specific intrinsic as an
> actual argument in real production, I'd wrap the generic version in my
> own specific rather than use the standard one.

For real production, I agree. For a test program, and maybe for a
quality verification program, I might actually use it. (See how close
the numeric integral comes to the analytic value.)

-- glen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.