let thresh = 700

let auto_upper size n i p =
  if n > thresh then Relative_entropy.relative_entropy_upper size n i p
  else Binomial.binom_upper size n i p

let auto_lower size n i p =
  if n > thresh then Relative_entropy.relative_entropy_lower size n i p
  else Binomial.binom_lower size n i p
