package bigint;
require 5.005;
-$VERSION = '0.02';
+$VERSION = '0.03';
use Exporter;
-@ISA = qw( Exporter );
-@EXPORT_OK = qw( );
+@ISA = qw( Exporter );
+@EXPORT_OK = qw( );
+@EXPORT = qw( inf NaN );
use strict;
use overload;
if ($trace)
{
require Math::BigInt::Trace; $class = 'Math::BigInt::Trace';
-# print STDERR "Loading $class";
}
else
{
# we take care of floating point constants, since BigFloat isn't available
# and BigInt doesn't like them:
overload::constant float => sub { Math::BigInt->new( _constant(shift) ); };
+
+ $self->export_to_level(1,$self,@a); # export inf and NaN
}
+sub inf () { Math::BigInt->binf(); }
+sub NaN () { Math::BigInt->bnan(); }
+
1;
__END__
=head1 NAME
-bigint - Transparent big integer support for Perl
+bigint - Transparent BigInteger support for Perl
=head1 SYNOPSIS
use bignt;
$x = 2 + 4.5,"\n"; # BigInt 6
- print 2 ** 512; # really is what you think it is
+ print 2 ** 512,"\n"; # really is what you think it is
+ print inf + 42,"\n"; # inf
+ print NaN * 7,"\n"; # NaN
=head1 DESCRIPTION