Skip to content

Commit

Permalink
Coerce -0 to +0 in HistogramCombiner
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvittal committed Apr 17, 2019
1 parent 5b2402b commit a10e874
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hail/src/main/scala/is/hail/stats/HistogramCombiner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HistogramCombiner(val indices: Array[Double]) extends Serializable {
else if (d > max)
nLarger += 1
else if (!d.isNaN) {
val bs = binarySearch(indices, d)
val bs = binarySearch(indices, 0d + d) // coerce -0.0 to +0.0
val ind = if (bs < 0)
-bs - 2
else
Expand Down

0 comments on commit a10e874

Please sign in to comment.