static void sort(float[] a,int left,int right,float[] work,int workBase,int workLen){
  while (left <= right && Float.isNaN(a[right])) {
    --right;
  }
  for (int k=right; --k >= left; ) {
    float ak=a[k];
    if (ak != ak) {
      a[k]=a[right];
      a[right]=ak;
      --right;
    }
  }
  doSort(a,left,right,work,workBase,workLen);
  int hi=right;
  while (left < hi) {
    int middle=(left + hi) >>> 1;
    float middleValue=a[middle];
    if (middleValue < 0.0f) {
      left=middle + 1;
    }
 else {
      hi=middle;
    }
  }
  while (left <= right && Float.floatToRawIntBits(a[left]) < 0) {
    ++left;
  }
  for (int k=left, p=left - 1; ++k <= right; ) {
    float ak=a[k];
    if (ak != 0.0f) {
      break;
    }
    if (Float.floatToRawIntBits(ak) < 0) {
      a[k]=0.0f;
      a[++p]=-0.0f;
    }
  }
}

static void sort ( float [ ] a , int left , int right , float [ ] work , int workBase , int workLen ) { while ( left <= right && Float . isNaN ( a [ right ] ) ) { -- right ; } for ( int k = right ; -- k >= left ; ) { float ak = a [ k ] ; if ( ak != ak ) { a [ k ] = a [ right ] ; a [ right ] = ak ; -- right ; } } doSort ( a , left , right , work , workBase , workLen ) ; int hi = right ; while ( left < hi ) { int middle = ( left + hi ) > > > 1 ; float middleValue = a [ middle ] ; if ( middleValue < 0.0f ) { left = middle + 1 ; } else { hi = middle ; } } while ( left <= right && Float . floatToRawIntBits ( a [ left ] ) < 0 ) { ++ left ; } for ( int k = left , p = left - 1 ; ++ k <= right ; ) { float ak = a [ k ] ; if ( ak != 0.0f ) { break ; } if ( Float . floatToRawIntBits ( ak ) < 0 ) { a [ k ] = 0.0f ; a [ ++ p ] = - 0.0f ; } } }
sorts the specified range of the array using the given workspace array slice if possible for merging
