question: public static int binarySearch ( double [ ] array , int startIndex , int endIndex , double value ) { checkIndexForBinarySearch ( array . length , startIndex , endIndex ) ; long longBits = Double . doubleToLongBits ( value ) ; int low = startIndex , mid = - 1 , high = endIndex - 1 ; while ( low <= high ) { mid = ( low + high ) > > > 1 ; if ( lessThan ( array [ mid ] , value ) ) { low = mid + 1 ; } else if ( longBits == Double . doubleToLongBits ( array [ mid ] ) ) { return mid ; } else { high = mid - 1 ; } } if ( mid < 0 ) { int insertPoint = endIndex ; for ( int index = startIndex ; index < endIndex ; index ++ ) { if ( value < array [ index ] ) { insertPoint = index ; } } return - insertPoint - 1 ; } return - mid - ( lessThan ( value , array [ mid ] ) ? 1 : 2 ) ; }
target:  Performs a binary search for the specified element in a part of the specified sorted array.