public int indexOf(final double value) {
			if (Double.isNaN(value)) {
				throw new IllegalArgumentException("Value is NaN.");
			}
			if (value < interval.min()) {
				return -1;
			}
			if (value >= interval.max() && value != Double.POSITIVE_INFINITY) {
				return size();
			}

			if (separators.length == 0) {
				return interval.compareTo(value);
			}

			int low = 0;
			int high = separators.length - 1;

			while (low <= high) {
				if (value < separators[low]) {
					return low;
				}
				if (value >= separators[high]) {
					return high + 1;
				}

				final int mid = (low + high) >>> 1;
				if (value < separators[mid]) {
					high = mid;
				} else if (value >= separators[mid]) {
					low = mid + 1;
				}
			}

			throw new AssertionError("This line will never be reached.");
		}
Return the index of the interval the given {@code value} belongs to.
If the value is smaller than the partition interval, -1 is returned.
If it is greater than the partition interval, {@link #size()} is
returned.

@param value the value to test
@return the interval index
@throws IllegalArgumentException if the value is {@link Double#NaN}
jenetics.incubator/src/main/java/io/jenetics/incubator/stat/Histogram.java