anchor.diff:      integer, parameter :: deriv=1, scaling=1  ! compute unscaled d(Bi(z))/dz
   
       call zbiry(real(z), aimag(z), deriv, scaling, resReal, resImag, underflow, ierr)
  +    if(ierr > 0) then
  +        if(ierr == 1) then
  +            print *, "IERR=1, INPUT ERROR - NO COMPUTATION"
  +        elseif(ierr == 2) then
  +            print *, "IERR=2, OVERFLOW - NO COMPUTATION, REAL(Z) TOO LARGE ON KODE=1"
  +        elseif(ierr == 3) then
  +            print *, "IERR=3, CABS(Z) LARGE - COMPUTATION DONE BUT LOSSES OF SIGNIFCANCE"
  +            print *, "BY ARGUMENT REDUCTION PRODUCE LESS THAN HALF OF MACHINE ACCURACY"
  +        elseif(ierr == 4) then
  +            print *, "IERR=4, CABS(Z) TOO LARGE - NO COMPUTATION BECAUSE OF COMPLETE"
  +            print *, "LOSSES OF SIGNIFICANCE BY ARGUMENT REDUCTION"
  +        elseif(ierr == 5) then
  +            print *, "IERR=5, ERROR - NO COMPUTATION ALGORITHM TERMINATION CONDITION NOT MET"
  +        endif
  +        call stop_error("dairyai: zairy error")
  +    endif
       res = resReal + i_*resImag
   end function dairybi
   
  
positive.code:     integer, parameter :: deriv=0, scaling=1  ! compute unscaled Ai(z)
  
      call zairy(real(z), aimag(z), deriv, scaling, resReal, resImag, underflow, ierr)
      res = resReal + i_*resImag
  end function airyai
  
  
negative.code:     integer :: underflows, ierr
  
      call zbesy(real(z), aimag(z), order, scaling, length, resReal, resImag, underflows, workr, worki, ierr)
      if(ierr > 0) then
          if(ierr == 1) then
              print *, "IERR=1, INPUT ERROR - NO COMPUTATION"
          elseif(ierr == 2) then
              print *, "IERR=2, OVERFLOW - NO COMPUTATION, FNU IS TOO LARGE OR CABS(Z)"
              print *, "IS TOO SMALL OR BOTH"
          elseif(ierr == 3) then
              print *, "IERR=3, CABS(Z) OR FNU+N-1 LARGE - COMPUTATION DONE BUT LOSSES OF SIGNIFCANCE"
              print *, "BY ARGUMENT REDUCTION PRODUCE LESS THAN HALF OF MACHINE ACCURACY"
          elseif(ierr == 4) then
              print *, "IERR=4, CABS(Z) OR FNU+N-1 TOO LARGE - NO COMPUTATION BECAUSE OF COMPLETE"
              print *, "LOSSES OF SIGNIFICANCE BY ARGUMENT REDUCTION"
          elseif(ierr == 5) then
              print *, "IERR=5, ERROR - NO COMPUTATION ALGORITHM TERMINATION CONDITION NOT MET"
          endif
          call stop_error("bessely: zbesy error")
      endif
      res = resReal(1) + i_*resImag(1)
  end function besselyv_complex
  
  