Fix bugs in montecarlo_uniform_SAD_ISD()

A few types are fixed. Section computing the predicted ISD is modified
to prevent crash for large datasets.