[Patch, Fortran] PR32980 - Add GAMMA and LGAMMA intrinsics

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Aug 21 20:32:00 GMT 2007


On Tue, Aug 21, 2007 at 09:18:12PM +0200, Tobias Schl?ter wrote:
> Tobias Burnus wrote:
> >:ADDPATCH fortran:
> >
> >This patch adds:
> >
> >a) The gamma function as vendor intrinsic GAMMA with the specific names
> >GAMMA and DGAMMA. (Only) "GAMMA" is also part of the current Fortran
> >2008 draft.
> >
> >b) The logarithm of the absolute value of the Gamma function as vendor
> >intrinsic LGAMMA with the specific names AGAMA and DGAMA. The Fortran
> >2008 draft has this function under the name LOG_GAMMA.
> >
> >While LGAMMA is compatible to LOG_GAMMA, I did not add the F2008/draft
> >version. Anyone thinks that I should?
> >
> >
> >Note: The functions tgamma (t = true) and lgamma are part of C99.
> >
> >Regression tested on x86-64/Linux. Ok for the trunk?
> 
> I'm worried that this will lead to surprising results for people that 
> have their own GAMMA functions defined.  Maybe a new std class is 
> appropriate?  What's the opposite of "legacy"?  Maybe "incompatible", as 
> in "even incompatible extensions"?
> 

A properly written program would contain "EXTERNAL GAMMA" for
a user defined function.  The proper std class is gnu if gfortran
provides this as a vendor extension.

-- 
Steve



More information about the Fortran mailing list