This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran] PR32980 - Add GAMMA and LGAMMA intrinsics
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Tobias Schl?ter <tobias dot schlueter at physik dot uni-muenchen dot de>
- Cc: Tobias Burnus <burnus at net-b dot de>, gcc-patches <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Tue, 21 Aug 2007 12:29:30 -0700
- Subject: Re: [Patch, Fortran] PR32980 - Add GAMMA and LGAMMA intrinsics
- References: <46CB3642.4080002@net-b.de> <46CB3A74.7040206@physik.uni-muenchen.de>
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