testFactorial method

void testFactorial()

Implementation

void testFactorial(){
  mp = MultiPrec();

  int i, j;
  int time;
  MPData a;
  String s;

  time = DateTime.now().millisecondsSinceEpoch;
  a = MPData();
  mpFactorial( a, 999 );
  s = mp.num2str( a );
  for( i = 0; i < s.length; i += 100 ){
    j = i + 100; if( j > s.length ) j = s.length;
    debugPrint( s.substring( i, j ) );
  }
  debugPrint( "${DateTime.now().millisecondsSinceEpoch - time} ms" );

  time = DateTime.now().millisecondsSinceEpoch;
  a = MPData();
  mpFactorial2( a, 999 );
  s = mp.num2str( a );
  for( i = 0; i < s.length; i += 100 ){
    j = i + 100; if( j > s.length ) j = s.length;
    debugPrint( s.substring( i, j ) );
  }
  debugPrint( "${DateTime.now().millisecondsSinceEpoch - time} ms" );
}