function q8_inverse_test ( )

%*****************************************************************************80
%
%% q8_inverse_test() tests q8_inverse().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 August 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'q8_inverse_test():\n' );
  fprintf ( 1, '  q8_inverse() inverts a quaternion;\n' );

  for i = 1 : 5

    q1 = q8_normal_01 ( );
    q2 = q8_inverse ( q1 );
    q3 = q8_multiply ( q1, q2 );

    fprintf ( 1, '\n' );
    q8_transpose_print ( q1, '  q1 = q8_normal_01 ( ):' );
    q8_transpose_print ( q2, '  q2 = q8_inverse ( q1 ):    ' );  
    q8_transpose_print ( q3, '  q3 = q8_multiply ( q1, q2 ):    ' );  

  end

  return
end
