1:  // Author & Copyright : Peter Luschny
   2:  // Created: 2010-01-15
   3:  // License: LGPL version 2.1 or (at your option)
   4:  // Creative Commons Attribution-ShareAlike 3.0
   5:   
   6:  #include <iostream>
   7:  #include "testfactorial.h"
   8:   
   9:  //  static void msg() {                                  std::cout << std::endl <<
  10:  //  "The fastes function is ParallelPrimeSwing. The computing    " << std::endl <<
  11:  //  "times of Schoenhage and PrimeSwing are approximately equal. " << std::endl <<
  12:  //  "Note that PrimeSwing uses 1/3 less space than Schoenhage's  " << std::endl <<
  13:  //  "algorithm. The space requirements in our implementation are " << std::endl <<
  14:  //  "2.PrimePi(n) for PrimeSwing and 3.PrimePi(n) for Schoenhage." << std::endl <<
  15:  //  "Writing an implementation for large n! without also paying  " << std::endl <<
  16:  //  "attention to the required space is pointless."                << std::endl;
  17:  //  std::cin.get(); }
  18:   
  19:  static void FactTest()
  20:  {
  21:      Test::FactorialSanityCheck(1000);
  22:   
  23:      for(ulong n = 1000000; n < 64000001; n = n*2)
  24:      {
  25:         Test::FactorialBenchmark(n);
  26:      }
  27:   
  28:      Test::FactorialBenchmark(100000000);
  29:  }
  30:   
  31:  int main()
  32:  {
  33:      FactTest();
  34:      std::cout << std::endl << "Done." << std::endl;
  35:      std::cin.get();
  36:      return 0;
  37:  }