Octave: a_double Comparison Operators: Example and Test
function ok = a_double_compare_xam()
%% load the Cppad Swig library
m_cppad
%% initialize return variable
ok = true;
% -----------------------------------------------------------------------
two = m_cppad.a_double(2.0);
three = m_cppad.a_double(3.0);
%
ok = ok && two < three;
ok = ok && two <= three;
ok = ok && three > two;
ok = ok && three >= two;
ok = ok && three != two;
ok = ok && three == three;
%
ok = ok && ~ (two > three) ;
ok = ok && ~ (two >= three) ;
ok = ok && ~ (two == three) ;
%return;
end