08-211r3
To: J3
From: Dan Nagle
Subject: Public Comment J32003
Date: 2008 August 12
Commenter from Tobias Burnus:
Fortran 2008 adds the BESSEL_YN and BESSEL_JN intrinsic procedures.
These are special in so far that they belong into two classes:
Class.
Case (i): BESSEL_JN (N,X) is an elemental function.
Case (ii): BESSEL_JN (N1,N2,X) is a transformational function.
Having a procedure of dual nature is confusing and conceptually
inconsistent. Furthermore, it increases the implementation burden for
the compiler vendor.
Additionally, I do not not see the need for the transformational
function; the same functionality can easily gained by using the
elemental function.
I therefore strongly prefer to make BESSEL_YN and BESSEL_JN only
elemental functions. If a burning need is seen for a BESSEL_*N(N1,N2,X)
function (which I do not see), one should add a new intrinsic with a
different name.
J3 Response:
Bessel functions of order greater than 1 are usually computed
via recursion relations. Frequently, values of several consecutive
orders of the same argument are needed. This requirement does not match
the usual implementation of ELEMENTAL procedures. Therefore, there is
an efficiency gain by providing the transformational form. Generic
resolution in this case will work as usual without undue confusion.
Also, using the same names for both forms reduces the number
of new names added to the intrinsic library. Therefore, J3 will not
make this change.