next up previous 196
Next: Bessel Functions
Up: PDA [1ex
Previous: Replacing calls to M01DJF


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.



next up previous 196
Next: Bessel Functions
Up: PDA [1ex
Previous: Replacing calls to M01DJF

PDA [1ex
Starlink User Note 194
H. Meyerdierks, D. Berry, P. W. Draper, G. Privett, M. Currie
12th October 2005
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council