public static void getRatios(Unsigned m, Unsigned n, Unsigned t, 
      File fout, Unsigned xOver) {
    BigInt.setRandSeed(1231538606138l);
    int pairs = m.intValue();
    double[] ratios = new double[t.intValue()];
    for(int j = 1; j <= t.intValue(); j++) {
      // generate m pairs of BigInts of length n*t
      int len = n.intValue() * j;
      BigInt[][] bigints = new BigInt[pairs][2];
      for(int i = 0; i < pairs; i++) {
        bigints[i][0] = new BigInt(len);
        bigints[i][1] = new BigInt(len);
      }
      // storage for execution times
      long[] koTimes = new long[pairs];
      long start = 0; // to record start time
      for(int i = 0; i < pairs; i++) {
        System.out.print("BigIntMul.getRatios(): computing pair " + (i + 1));
        System.out.print(" of " +  pairs + " with " + len + " digits.\n");
        // multiple using koMul
        start = System.currentTimeMillis(); 
        StudentCode.koMulOpt(bigints[i][0], bigints[i][1]);
        // record exe time
        koTimes[i] = System.currentTimeMillis() - start;
      }
      // sort array in ascending order
      Arrays.sort(koTimes); 
      // store ratio = runtime / n^(lg_3)
      if(len >= xOver.intValue())
        ratios[j - 1] = ((double)koTimes[pairs - 1] / Math.pow(len, lgPwr_));
      else ratios[j - 1] = 0;
    }
    // print runtimes to output file
    try {
      BufferedWriter sOut = new BufferedWriter(new FileWriter(fout));
      for(int j = (xOver.intValue()/n.intValue()) - 1; 
          j < t.intValue(); j++) {
        // print in columns "integer-size ratio" 
        sOut.write(((j + 1) * n.intValue()) + "\t" + 
                    ratios[j] + "\n");
      }
      // record max and average ratios and print the sorted ratios in the file
      Arrays.sort(ratios); // sort ratio array
	  sOut.write ("Ignoring ratios before cross over point: "+(xOver.intValue()/n.intValue())+"\n");
	  sOut.write ("Sorted ratios are: ");
	  for(int i = (xOver.intValue()/n.intValue()) - 1; 
		  i < t.intValue(); i++){
		  sOut.write(ratios[i]+", ");
	  }
	  sOut.write("\n");
	  sOut.write("Maximum ratio is: " + ratios[t.intValue() - 1] + "\n");
      sOut.write("Average ratio is: " + Arithmetic.average(ratios,(xOver.intValue()/n.intValue()) - 1));
	  sOut.close();
      System.err.println("BigIntMul.getRatios() results printed to " + fout.getPath());
    }
    catch (Exception e) {//Catch exception if any
      System.err.println("ERROR. BigInt.getRatios() IO error " + e.getMessage());
    }
    // record ratios for later use! 
    max_ratio_ = ratios[t.intValue() - 1];
    avg_ratio_ = Arithmetic.average(ratios,(xOver.intValue()/n.intValue()) - 1);	  
  }