| Package variables | General documentation | Methods |
| Package variables | Top |
| No package variables defined. |
| Synopsis | Top |
| Description | Top |
| Methods | Top |
| log10 | No description | Code |
| max | No description | Code |
| min | No description | Code |
| new | No description | Code |
| precision | No description | Code |
| precision_string | No description | Code |
| log10 | description | prev | next | Top |
sub log10
{my $self = shift; my $n = shift; return log($n) / log(10);} |
| max | description | prev | next | Top |
sub max
{ my $self = shift;
my $max = shift;
my $next;
while (@_) {
$next = shift;
$max = $next if ($next > $max);
}
return $max;} |
| min | description | prev | next | Top |
sub min
{ my $self = shift;
my $min = shift;
my $next;
while (@_) {
$next = shift;
$min = $next if ($next < $min);
}
return $min;} |
| new | description | prev | next | Top |
sub new
{ my $class = shift;
my $self = {};
bless($self, $class);
return $self;} |
| precision | description | prev | next | Top |
sub precision
{my $self = shift; my ($x) = @_; return abs int($self->log10(abs $x) - SIGNIFICANT);} |
| precision_string | description | prev | next | Top |
sub precision_string
{ my $self = shift;
my ($x) = @_;
if ($x) {
return sprintf "%." . $self->precision($x) . "f", $x;
} else {
return "0";
}} |