function is_prime2_test ( )

%*****************************************************************************80
%
%% is_prime2_test() tests is_prime2().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 December 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'is_prime2_test():\n' );
  fprintf ( 1, '  is_prime2() returns values of the is_prime() function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '           n          is_prime(n)          is_prime2(n)\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, n, tf1 ] = is_prime_values ( n_data );

    if ( n_data == 0 )
      break;
    end

    tf2 = is_prime2 ( n );

    if ( tf1 )
      ch1 = 'true';
    else
      ch1 = 'false';
    end

    if ( tf2 )
      ch2 = 'true';
    else
      ch2 = 'false';
    end

    fprintf ( 1, '%12d  %s  %s\n', n, ch1, ch2 );


  end

  return
end
