14 Normal Distribution

The error function erf() in NAG is S15AEF. In SLATEC it is replaced by PDA_DERF. The NAG code might look like

        INTEGER IFAIL
        DOUBLE PRECISION X, P
        DOUBLE PRECISION S15AEF
        IFAIL = 1
        P = S15AEF( 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_DERF
        IFAIL = 0
        P = PDA_DERF( X, IFAIL )
        IF ( IFAIL .NE. 0 ) THEN
           An error has occurred
        END IF

The complementary error function erfc() in NAG is S15ADF. In SLATEC it is replaced by PDA_DERFC. Migration hints are not yet available, but the replacement of calls to S15ADF with PDA_DERF should be very similar to replacing S15AEF with PDA_DERF.