J3/04-246
Date: 13 Feb 2004
To: J3
From: Dan Nagle
Subject: libm Procedures as Intrinsics
There are a number of functions contained in the standard C libm
which would be useful as Fortran intrinsics. Doing so would
remove the need to use C binding interfaces for these procedures.
The costs of doing so is low, because most vendors also supply C
compilers, and so support these functions anyway.
Number:
Title: Add Some of C libm to the Fortran Intrinsics
Submitted By: J3
Status: For Consideration
References: C99, also man (3m)
Basic Functionality: Add those libm mathematical functions
not already in the Fortran intrinsic set.
Rationale: These functions are useful, otherwise they would not be
part of standard C. If Fortran is to be a mathematical
programming language, it should also support them.
Estimated Impact: I estimate the impact is low, because most vendors
also support C compilers, and so already support
these procedures in their libraries. There will be
some impact if these procedures must be supplied
for kinds not supported by C.
Detailed Specification: Add the following libm functions to the Fortran
intrinsic procedures set:
Bessel functions (j0, j1, jn, y0, y1, yn)
Error Functions (erf, erfc)
Log gamma (gamma)
Hypotenuse (hypot)
Note that the hypot function is supposed to take
special care not to overflow where sqrt( sum(...**2))
might.
History: