package a_double_property_xam; sub a_double_property_xam() { # check for standard perl programming conventions use strict; use warnings; # # load the Cppad Swig library use pm_cppad; # # initilaize return variable my $ok = 1; # --------------------------------------------------------------------- my $three = new pm_cppad::a_double(3.0); # $ok = $ok && $three->value() == 3.0; $ok = $ok && $three->parameter(); $ok = $ok && ! $three->variable(); # # near_equal my $r3 = $three->sqrt() ; $ok = $ok && $three->near_equal( $r3 * $r3) ;; # return( $ok ); }