NAG Library Manual, Mark 27.2
Interfaces:  FL   CL   CPP   AD 

NAG AD Library Introduction
Example description
    Program s15ab_p0w_fe

!     S15AB_P0W_F Example Program Text
!     Mark 27.2 Release. NAG Copyright 2021.

!     .. Use Statements ..
      Use iso_c_binding, Only: c_ptr
      Use nagad_library, Only: s15ab_p0w_f
      Use nag_library, Only: nag_wp
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: nout = 6
!     .. Local Scalars ..
      Type (c_ptr)                     :: ad_handle
      Real (Kind=nag_wp)               :: p, x
      Integer                          :: ifail
!     .. Executable Statements ..
      Write (nout,*) 'S15AB_P0W_F Example Program Results'

      x = -1._nag_wp

      Write (nout,*)
      Write (nout,*) '       x         P(x)'

      ifail = 0
      Call s15ab_p0w_f(ad_handle,x,p,ifail)

      Write (nout,99999) x, p

99999 Format (1X,1P,4E12.3)
    End Program s15ab_p0w_fe