3 # for testing subclassing Math::BigFloat
5 package Math::BigFloat::Subclass;
11 use Math::BigFloat(1.38);
12 use vars qw($VERSION @ISA $PACKAGE
13 $accuracy $precision $round_mode $div_scale);
15 @ISA = qw(Exporter Math::BigFloat);
19 use overload; # inherit overload from BigInt
22 $accuracy = $precision = undef;
29 my $class = ref($proto) || $proto;
32 my $a = $accuracy; $a = $_[0] if defined $_[0];
33 my $p = $precision; $p = $_[1] if defined $_[1];
34 # Store the floating point value
35 my $self = Math::BigFloat->new($value,$a,$p,$round_mode);
37 $self->{'_custom'} = 1; # make sure this never goes away
43 *objectify = \&Math::BigInt::objectify;
44 # to allow Math::BigFloat::Subclass::bgcd( ... ) style calls
45 *bgcd = \&Math::BigFloat::bgcd;
46 *blcm = \&Math::BigFloat::blcm;