Skip to content

Commit

Permalink
NULL_PREFIX has to be negative infinity for floating point types
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jul 7, 2015
1 parent 613e16f commit 88aff18
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public long computePrefix(float value) {
return Float.floatToIntBits(value) & 0xffffffffL;
}

public final long NULL_PREFIX = computePrefix(Float.MIN_VALUE);
public final long NULL_PREFIX = computePrefix(Float.NEGATIVE_INFINITY);
}

public static final class DoublePrefixComparator extends PrefixComparator {
Expand All @@ -118,6 +118,6 @@ public long computePrefix(double value) {
return Double.doubleToLongBits(value);
}

public final long NULL_PREFIX = computePrefix(Double.MIN_VALUE);
public final long NULL_PREFIX = computePrefix(Double.NEGATIVE_INFINITY);
}
}

0 comments on commit 88aff18

Please sign in to comment.