- or download this
sub function($_) #arbitary function...will be given in the partually w
+ritten program
{
return ( $_[0] - 50.02 )**2 + 2;
}
- or download this
use Carp qw/croak/; # put near the top of your program
sub function {
...
my ( $x, $y ) = @_;
# ... body of function
}
- or download this
sub fp_equal {
my ($X, $Y, $POINTS) = @_;
my ($tX, $tY);
...
$tY = sprintf("%.${POINTS}g", $Y);
return $tX eq $tY;
}