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

NAG FL Interface Introduction
Example description
    Program s14ccfe

!     S14CCF Example Program Text
!     Mark 30.2 Release. NAG Copyright 2024.

!     .. Use Statements ..
      Use nag_library, Only: nag_wp, s14ccf
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
      Real (Kind=nag_wp)               :: a, b, w, w1, x
      Integer                          :: i, ifail
!     .. Executable Statements ..
      Write (nout,*) 'S14CCF Example Program Results'
      Write (nout,*)
      Write (nout,*)                                                           &
        '  A     B     X           Ix(A,B)                1-Ix(A,B)'
      Write (nout,*)

!     Skip heading in data file
      Read (nin,*)

      Do
        Read (nin,*,Iostat=i) a, b, x
        If (i/=0) Then
          Exit
        End If

        ifail = -1
        Call s14ccf(a,b,x,w,w1,ifail)

        If (ifail==0) Then
          Write (nout,99999) a, b, x, w, w1
        End If
      End Do

99999 Format (3F6.2,1P,E17.4,7X,E17.4)
    End Program s14ccfe