my $round = shift; $round = 0 if !defined $round; # no rounding as default
my $self = {}; bless $self, $class;
- # shortcut for bigints and it's subclasses
+ # shortcut for bigints and its subclasses
if ((ref($wanted)) && (ref($wanted) ne $class))
{
$self->{_m} = $wanted->as_number(); # get us a bigint copy
return $l if $l != 0;
# lengths are equal, so compare mantissa, if equal, compare exponents
- # this assumes normaized numbers (no trailing zeros etc!)
+ # this assumes normalized numbers (no trailing zeros etc!)
my $rc = $x->{_m} <=> $y->{_m} || $x->{_e} <=> $y->{_e};
$rc = -$rc if $x->{sign} eq '-'; # -124 < -123
return $rc;
sub is_odd
{
- # return true if arg (BINT or num_str) is odd or -1 if even
+ # return true if arg (BINT or num_str) is odd or false if even
my $x = shift; $x = $class->new($x) unless ref $x;
#my ($self,$x) = objectify(1,@_);
sub is_even
{
- # return true if arg (BINT or num_str) is even or -1 if odd
+ # return true if arg (BINT or num_str) is even or false if odd
my $x = shift; $x = $class->new($x) unless ref $x;
#my ($self,$x) = objectify(1,@_);
C<< Math::BigFloat::round_mode($rnd_mode); >> you can get and set the default
mode for subsequent rounding. The usage of C<$Math::BigFloat::$rnd_mode> is
no longer supported.
- The second parameter to the round functions then overrides the default
+The second parameter to the round functions then overrides the default
temporarily.
The C<< as_number() >> function returns a BigInt from a Math::BigFloat. It uses