08-227
To: J3
From: Michael Ingrassia
Subject: Public Comment J32013
Date: 2008 July 08
----------------------------------------------------------------------
Commenter's Subject was "additional intrinsic functions"
I suggest adding a few more functions to the list
of intrinsic functions.
The standard should include an intrinsic function
named COMPLEX. The function should be of the form
COMPLEX(X, [Y, KIND])
where X, Y, and KIND are defined as for the
intrinsic function CMPLX. Unlike CMPLX, if both
X AND Y are present and are REAL and KIND is not
present, the kind type parameter values of X and
Y shall be the same and the kind type parameter
value of the result shall be the same as the kind
type parameter values of X and Y.
The degree trigonometric functions COSD, SIND, and
TAND are supplied in most Fortran implementations
already. I have seen several examples of functions
written by users to implement the degree
trigonometric functions. Those functions often
produce poor results. Producing good results
requires a better understanding of floating-point
arithmetic than many users have. Producing
high-quality results (good to within 0.5+epsilon
ulps) is probably beyond the ability of all but a
few dozen users.
Fortran should also supply routines the functions
EXPM1 and LOGP1, where EXPM1(X) computes EXP(X-1.0)
and LOGP1(X) computes LOG(X+1.0). The functions
should be computed to greater accuracy than the
straightforward implementation. These are functions
for people who know very well how floating-point
arithmetic works. They offer knowledgeable users
a chance to produce highly accurate results in
some cases where it would be difficult to produce
accurate results without using such functions.
----------------------------------------------------------------------