+ /* pairs[i].correlation is a correlation, so mathematically it will
+ always be in the range [-1.0, 1.0]. Inaccurate calculations sometimes
+ cause it to be slightly greater than 1.0, however, which makes the
+ sqrt() below to come out as NaN instead of 0. So force it to be 1.0
+ or less. */
+ double corr = MIN (1.0, pairs[i].correlation);
+