anchor.diff:          elseif( a(cindex)>=table%tbval(2, crow+dd-1) ) then
              outa = 0.d0
           else
  -          do i=crow, crow+dd-1
  +          do i=crow, crow+dd-2
               if( a(cindex)>=table%tbval(2, i) .and. a(cindex)<table%tbval(2, i+1) ) then 
                 outa = (table%tbval(1, i+1)-table%tbval(1, i))/(table%tbval(2, i+1)-table%tbval(2, i))
                 exit
  
positive.code:               dd = ddd
                call GetTableGrad( a, cindex, table, dd, crow, outa )	
          else
            do i=crow, crow+dd-1, ddd
              if( a(cindex)==table%tbval(ccol, i) ) then
                crow = i
                cindex = cindex+1
  
negative.code:             dd = ddd
              call GetTableData( a, cindex, table, dd, crow, outa )	
          else
            do i=crow, crow+dd-2, ddd
              if( a(cindex)==table%tbval(ccol, i) ) then
                crow = i
                cindex = cindex+1
  