15 Bessel Functions

PDA_DBESJ1 has not yet been used anywhere to replace S17AFF. Thus the migration hints given here may contain errors or may be based on misunderstandings.

The Bessel function J_1() in NAG is S17AFF. In SLATEC it is replaced by PDA_DBESJ1. The NAG code might look like

        INTEGER IFAIL
        DOUBLE PRECISION X, P
        DOUBLE PRECISION S17AFF
        IFAIL = 1
        P = S17AFF( X, IFAIL )
        IF ( IFAIL .NE. 0 ) THEN
           An error has occurred
        END IF

The new code would be

        INTEGER IFAIL
        DOUBLE PRECISION X, P
        DOUBLE PRECISION PDA_DBESJ1
        IFAIL = 0
        P = PDA_DBESJ1( X, IFAIL )
        IF ( IFAIL .NE. 0 ) THEN
           An error has occurred
        END IF