function errors_test26 ( )

%*****************************************************************************80
%
%% errors_test26()
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 August 2017
%
%  Author:
%
%    John Burkardt
%
  n = 27;
  x = 1.0000001;
  x_n = 674530.4707;

  fprintf ( 1, '\n' );
  fprintf ( 1, '+=============================================+\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Exercise 26                                |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Estimate an integer power of a             |\n' );
  fprintf ( 1, '|  real number.                               |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  The computation is                         |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|    (1.0000001)^(2^27)                       |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|  Correct value is:                          |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '|    674,530.4707                             |\n' );
  fprintf ( 1, '|                                             |\n' );
  fprintf ( 1, '+=============================================+\n' );
  fprintf ( 1, '\n' );

  x_1 = x ^ ( 2 ^ n );

  x_2 = x;
  for i = 1 : n
    x_2 = x_2 * x_2;
  end

  x_3 = exp ( log ( x ) * ( 2 ^ n ) );

  x_4 = exp ( log ( x ) * exp ( log ( 2.0 ) * n ) );

  fprintf ( 1, '  X^(2^N) =              %20.16g\n', x_1 );
  fprintf ( 1, '  X*X*...*X =            %20.16g\n', x_2 );
  fprintf ( 1, '  E^(logX*27^N)) =       %20.16g\n', x_3 );
  fprintf ( 1, '  E^(logX*E^(27*logN)) = %20.16g\n', x_4 );

  return
end
