question: long calculateMidEntry ( long loVal , long hiVal , final double dfp , long loEntry , long hiEntry ) { final double dhi = ( double ) hiEntry ; final double dlo = ( double ) loEntry ; final double dhiVal = ( double ) hiVal ; final double dloVal = ( double ) loVal ; long midEntry = loEntry + ( long ) ( ( dhi - dlo ) * ( dfp - dloVal ) / ( dhiVal - dloVal ) ) ; if ( midEntry == hiEntry ) { midEntry -- ; } return midEntry ; }
target:  Calculates a mid entry where to divide the interval