/**
  * Creates a sequence of values starting at {@code min} and ending at
  *
  * {@code max}, the log of which are evenly spaced.
  * @param min sequence value
  * @param max sequence value
  * @param step sequence spacing
  * @param ascending if {@code true}, descending if {@code false}
  * @return a monotonically increasing or decreasing sequence where the log
  *         of the values are evenly spaced
  */
 public static function buildLogSequence($min, $max, $step, $ascending)
 {
     $seq = RTGM_Util::buildSequence(log($min), log($max), log($step), $ascending);
     return RTGM_Util::exp($seq);
 }
 $riskIters = array(0.89937139475318, 1.1544650238328, 1.0007739239289);
 // Values for testing methods.
 $afe4uhgm = -log(1 - 0.02) / 50;
 $min_sa = 0.001;
 $rtgmTmp = 24.000128833913;
 $riskTmp = 0.009838107787837501;
 $target_risk = -log(1 - 0.01) / 50;
 $uhgm = 0.6753857172769;
 $usampling_factor = 1.05;
 $rtgm = new RTGM($xs, $ys, Frequency::SA_1P00, 0.8);
 // RGTM_Util method tests
 $a = array(1.0, 3.0, 5.0, 7.0, 8.0, 9.0, 10.0);
 notify('Binary search found', 2, RTGM_Util::binary_search($a, 5.0));
 notify('Binary search not found', -4, RTGM_Util::binary_search($a, 6.0));
 notify('Build Sequence', 178, count(RTGM_Util::buildSequence(log($min_sa), log($xs[count($xs) - 1]), log($usampling_factor), true)));
 notify('Build Sequence Inf/NaN', 0, count(RTGM_Util::buildSequence(INF, NAN, 1, true)));
 $a2 = array(1, 2, 3);
 notify('Exp', array(2.718281828459, 7.3890560989307, 20.085536923188), RTGM_Util::exp($a2));
 notify('Find Log Log X', $uhgm, RTGM_Util::findLogLogX($xs, $ys, $afe4uhgm));
 notify('Find Log Log Y', $afe4uhgm, RTGM_Util::findLogLogY($xs, $ys, $uhgm));
 notify('Log Normal Cumulative Prob', 0.012893887361471, RTGM_Util::logNormalCumProb(1.3, 1.6, 0.6));
 notify('Log Normal Cumulative Prob (0)', 0.0, RTGM_Util::logNormalCumProb(0.0, 1.6, 0.6));
 notify('Log Normal Density', 0.042613954514149, RTGM_Util::logNormalDensity(1.3, 1.6, 0.6));
 notify('Log Normal Density (0)', 0.0, RTGM_Util::logNormalDensity(0.0, 1.6, 0.6));
 $a3 = array(1, 2, 3);
 notify('Multiply', array(3, 8, 15), RTGM_Util::multiply($a3, array(3, 4, 5)));
 $a4 = array(10, 20, 30);
 notify('Scale', array(1, 2, 3), RTGM_Util::scale($a4, 0.1));
 notify('Trapz', $riskTmp, RTGM_Util::trapz($xs, $ys));
 // Statistics method tests
 notify('ErfInv', 0.47693627620447, Statistics::erfInv(0.5));