anchor.diff:      if(dynk_iData(dynk_funcs(dynk_nFuncs,3)+2) < 0) then
         ! mcut < 0
         write (lout,"(a)") "DYNK> ERROR FUN:RANDG mcut must be >= 0"
  -      call prror(-1)
  +      iErr = .true.
  +      return
       end if
   
     ! END CASE RANDG
  
positive.code:       inquire(unit=dynk_iData(dynk_niData+1), opened=lOpen)
        if(lOpen) then
          write(lout,"(a)")"DYNK> ERROR FUN:PIPE File '"//trim(dynk_cData(dynk_ncData-1))//"' is already open"
          call prror(-1)
        end if
  
        ! DYNK PIPE does not support the CR version, so BOINC support (call boincrf()) isn't needed
        open(unit=dynk_iData(dynk_niData+1),file=dynk_cData(dynk_ncData-1),action="write",iostat=ioStat,status="old")
        if(ioStat /= 0) then
          write(lout,"(a)") "DYNK> ERROR FUN:PIPE Could not open file '"//trim(dynk_cData(dynk_ncData-1))//"' stat = ",ioStat
          call prror(-1)
        end if
        write(dynk_iData(dynk_niData+1),"(a)") "DYNKPIPE !******************!" ! Once per file
  
  
negative.code: 
    ! END CASE RANDON
  
    case("FIR","IIR")
      ! FIR: Finite Impulse Response filter
      ! y[n] = \sum_{i=0}^N b_i*x[n-i]
      ! where N is the order of the filter, x[] is the results from previous calls to the input
      ! function, and b_i is a set of coefficients. The coefficients are loaded from an ASCII
      ! file, formatted with three columns: the first one being the index 0...N, the second being
      ! the coefficients b_0...b_N, and the third one being the initial values of x[n]..x[n-N].
      ! When running, the values x[n]...x[n-N] are the N last results from calling baseFUN.
      ! Note that this means that at the first call, x[n-0] is pushed into x[n-1] etc., and x[n-N]
      ! is deleted; i.e. the initial x[n-N] is never used.
      !
      ! Format in dynk_fData:
      ! b_0 <- dynk_funcs(<this>,3)
      ! x[n]
      ! x_init[n] (holds the x[n]s from the input file, used to reset the FIR at the first turn)
      ! b_1
      ! x[n-1]
      ! x_init[n-1]
      ! (etc., repeat dynk_funcs(<this>,4)+1 times)
      !
      ! IIR: Infinite Impulse Response filter
      ! y[n] = \sum_{i=0}^N b_i*x[n-i] \sum_{i=1}^M a_i*y[i-n]
      ! where N=M. This is the same as FIR, except that it also uses previous values of it's own
      ! output. The input file is also identical, except adding two extra columns: One for the
      ! coefficients a_0...a_N, and one for the initial values of y[n]...y[n-N]. For both these
      ! columns, the first row (a_0 and y[n]) are ignored. For the first of these columns, the
      ! first value (a_0) is ignored and never used, while y[n-0] is pushed into y[n-1] at the
      ! first evaluation, such that the initial x[n-N] is never used (just like for x[n-N]).
      !
      ! Format in dynk_fData:
      ! b_0 <- dynk_funcs(<this>,3)
      ! x[n]
      ! x_init[n]
      ! a_0  (a_0 is never used)
      ! y[n] (zeroed for computation, used to hold previously returned value)
      ! y_init[n] (holds the y[n]s from the input file, used to reset the FIR at the first turn)
      ! b_1
      ! x[n-1]
      ! x_init[n-1]
      ! a_1
      ! y[n-1]
      ! y_init[n-1]
      ! (etc., repeat dynk_funcs(<this>,4) times)
  
      call dynk_checkargs(nFields,6,"FUN funname {FIR|IIR} N filename baseFUN")
  
      select case(trim(lnSplit(3)))
      case("FIR")
        isFIR = .true.
      case("IIR")
        isFIR = .false.
      end select
  
      call chr_cast(lnSplit(4),t,cErr) ! N
      if(isFIR) then
        call dynk_checkspace(0,3*(t+1),2)
      else
        call dynk_checkspace(0,6*(t+1),2)
      end if
  
      ! Set pointers to start of funs data blocks
      dynk_nFuncs = dynk_nFuncs+1
      dynk_ncData = dynk_ncData+1
  
      ! Store pointers
      dynk_funcs(dynk_nFuncs,1) = dynk_ncData   ! NAME (in dynk_cData)
      if(isFIR) then
        dynk_funcs(dynk_nFuncs,2) = 10 ! TYPE (FIR)
      else
        dynk_funcs(dynk_nFuncs,2) = 11 ! TYPE (IIR)
      end if
      dynk_funcs(dynk_nFuncs,3) = dynk_nfData+1 ! ARG1 (start of float storage)
      dynk_funcs(dynk_nFuncs,4) = t             ! ARG2 (filter order N)
      dynk_funcs(dynk_nFuncs,5) = &             ! ARG3 (filtered function)
      dynk_findFUNindex(trim(lnSplit(6)), 1)
  
      ! Store metadata
      dynk_cData(dynk_ncData) = trim(lnSplit(2))             ! NAME
      call chr_cast(lnSplit(4),dynk_iData(dynk_niData),cErr) ! N
  
      ! Sanity check
      if(dynk_funcs(dynk_nFuncs,5) == -1) then
        call dynk_dumpdata
        write(lout,"(a)") "DYNK> ERROR FUN:FIR/IIR Requesting function '"//trim(lnSplit(6))//"'. This FUN is unknown."
        iErr = .true.
        return
      end if
      if(len(lnSplit(5)) > mStrLen-1) then
        write(lout,"(2(a,i0))") "DYNK> ERROR FUN:FIR/IIR Got a filename name with length = ",len(lnSplit(5))," > ",mStrLen-1
        iErr = .true.
        return
      end if
      if(dynk_iData(dynk_niData) <= 0) then
        write(lout,"(a)") "DYNK> ERROR FUN:FIR/IIR Got N <= 0, this is not valid."
        iErr = .true.
        return
      end if
  
      ! More metadata
      dynk_ncData = dynk_ncData+1
      dynk_cData(dynk_ncData) = trim(lnSplit(5)) ! FILE NAME
  
      ! Read the file
      inquire(unit=dynk_fileUnitFUN, opened=lOpen)
      if(lOpen) then
        write(lout,"(a)") "DYNK> ERROR FUN:FIR/IIR Could not open file '"//trim(dynk_cData(dynk_ncData))//"'"
        iErr = .true.
        return
        end if
  #ifdef BOINC
      call boincrf(dynk_cData(dynk_ncData),filename)
      open(unit=dynk_fileUnitFUN,file=filename,action="read",iostat=ioStat,status="old")
  #else
      open(unit=dynk_fileUnitFUN,file=dynk_cData(dynk_ncData),action="read",iostat=ioStat,status="old")
  #endif
      if(ioStat /= 0) then
        write(lout,"(a,i0)") "DYNK> ERROR FUN:FIR/IIR Could not open file '"//trim(dynk_cData(dynk_ncData))//"', stat = ",ioStat
        iErr = .true.
        return
      end if
  
      do ii=0, dynk_funcs(dynk_nFuncs,4)
        ! Reading the FIR/IIR file without CRLIBM
        read(dynk_fileUnitFUN,"(a)",iostat=ioStat) fLine
        if(ioStat /= 0) then ! EOF
          write(lout,"(a)") "DYNK> ERROR FUN:FIR/IIR Unexpected when reading file '"//trim(dynk_cData(dynk_ncData))//"'"
          iErr = .true.
          return
        end if
  
        call chr_split(fLine,lnFile,nFile,spErr)
        if(spErr) then
          write(lout,"(a)") "DYNK> ERROR FUN:FIR/IIR Failed to parse input line."
          iErr = .true.
          return
        end if
        if(isFIR) then
          if(nFile /= 3) then
            write(lout,"(a,i0)") "DYNK> ERROR FUN:FIR/IIR Expected 3 values per line, got ",nFIle
            iErr = .true.
            return
          end if
          call chr_cast(lnFile(1),t,cErr)
          call chr_cast(lnFile(2),x,cErr)
          call chr_cast(lnFile(3),y,cErr)
        else
          if(nFile /= 5) then
            write(lout,"(a,i0)") "DYNK> ERROR FUN:FIR/IIR Expected 5 values per line, got ",nFIle
            iErr = .true.
            return
          end if
          call chr_cast(lnFile(1),t,cErr)
          call chr_cast(lnFile(2),x,cErr)
          call chr_cast(lnFile(3),y,cErr)
          call chr_cast(lnFile(4),z,cErr)
          call chr_cast(lnFile(5),u,cErr)
        end if
  
        ! More sanity checks
        if(t /= ii) then
          write(lout,"(a)")       "DYNK> ERROR FUN:FIR/IIR Reading file '"//trim(dynk_cData(dynk_ncData))//"'"
          write(lout,"(2(a,i0))") "DYNK> Got line t = ",t,", expected ",ii
          iErr = .true.
          return
        end if
  
        ! Save data to arrays
        ! Store coefficients (x) and initial/earlier values (y) in interlaced order
        dynk_nfData = dynk_nfData+1
        dynk_fData(dynk_nfData) = x      ! b_i
        dynk_nfData = dynk_nfData+1
        dynk_fData(dynk_nfData) = y      ! x[n-1]
        dynk_nfData = dynk_nfData+1
        dynk_fData(dynk_nfData) = y      ! x_init[n-i] (Not really needed anymore, but fixing allignment is painfull)
        if(.not.isFIR) then
          dynk_nfData = dynk_nfData+1
          dynk_fData(dynk_nfData) = z   ! a_i
          dynk_nfData = dynk_nfData+1
          dynk_fData(dynk_nfData) = u ! y[n-i]
          dynk_nfData = dynk_nfData+1
          dynk_fData(dynk_nfData) = u   ! y_init[n-i]  (Not really needed anymore, but fixing allignment is painfull)
        end if
      end do
      close(dynk_fileUnitFUN)
  
    ! END CASES FIR & IIR
  
      case("ADD","SUB","MUL","DIV","POW") ! Operators: #20-39
          ! Two-argument operators  y = OP(f1, f2)
  