Prev Next a_double_property_xam.m Headings

@(@\newcommand{\B}[1]{ {\bf #1} } \newcommand{\R}[1]{ {\rm #1} }@)@
Octave: a_double Properties: Example and Test
function ok = a_double_property_xam()
     %
     % load the Cppad Swig library
     m_cppad
     %
     % initialize return variable
     ok = true;
     % -----------------------------------------------------------------------
     three = m_cppad.a_double(3.0);
     %
     ok = ok && three.value()   == 3.0;
     ok = ok && three.parameter();
     ok = ok && ~ three.variable();
     %
     % near_equal
     r3 = three.sqrt() ;
     ok = ok && three.near_equal( r3 * r3) ;;
     %
     return;
end

Input File: build/lib/example/octave/a_double_property_xam.m