Skip to content

Commit

Permalink
Utls.list_medianf: use float comparison instead of generic
Browse files Browse the repository at this point in the history
  • Loading branch information
UnixJunkie committed Nov 15, 2019
1 parent 4e06579 commit fce02e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utls.ml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ let in_bounds lb x hb =

let list_medianf (l: float list): float =
let xs = Array.of_list l in
Array.sort Pervasives.compare xs;
Array.sort BatFloat.compare xs;
let n = Array.length xs in
if n mod 2 = 1 then
xs.(n/2)
Expand Down

0 comments on commit fce02e7

Please sign in to comment.