$x->digit(-$n); # return the nth digit, counting from left
# The following all modify their first argument. If you want to pre-
- # serve $x, use $z = $x->copy()->bXXX($y); See under L<CAVEATS> for
+ # serve $x, use $z = $x->copy()->bXXX($y); See under L</CAVEATS> for
# necessary when mixing $a = $b assignments with non-overloaded math.
# set
=head2 Accuracy vs. Precision
-See also: L<Rounding|Rounding>.
+See also: L<Rounding|/Rounding>.
Math::BigFloat supports both precision (rounding to a certain place before or
after the dot) and accuracy (rounding to a certain number of digits). For a
that number will also be rounded.
In most cases, you should probably round the results explicitly using one of
-L<round()>, L<bround()> or L<bfround()> or by passing the desired accuracy
+L<Math::BigInt/round()>, L<Math::BigInt/bround()> or L<Math::BigInt/bfround()> or by passing the desired accuracy
to the math operation as additional parameter:
my $x = Math::BigInt->new(30000);
$P = CLASS->precision(); # read out global precision
$P = $x->precision(); # read out precision that affects $x
-Note: You probably want to use L<accuracy()> instead. With L<accuracy> you
-set the number of digits each result should have, with L<precision> you
+Note: You probably want to use L</accuracy> instead. With L</accuracy> you
+set the number of digits each result should have, with L</precision()> you
set the place where to round!
=head2 bexp()
print $y->batan2($x), "\n";
Calculate the arcus tanges of C<$y> divided by C<$x>, modifying $y in place.
-See also L<batan()>.
+See also L</batan()>.
This method was added in v1.87 of Math::BigInt (June 2007).
my $x = Math::BigFloat->new(1);
print $x->batan(100), "\n";
-Calculate the arcus tanges of $x, modifying $x in place. See also L<batan2()>.
+Calculate the arcus tanges of $x, modifying $x in place. See also L</batan2()>.
This method was added in v1.87 of Math::BigInt (June 2007).
=item precision() vs. accuracy()
-A common pitfall is to use L<precision()> when you want to round a result to
+A common pitfall is to use L</precision()> when you want to round a result to
a certain number of digits:
use Math::BigFloat;
print "$z\n";
print $z->precision(),"\n"; # 4
-Replacing L<precision> with L<accuracy> is probably not what you want, either:
+Replacing L</precision()> with L</accuracy> is probably not what you want, either:
use Math::BigFloat;
=item Output
Output values are BigInt objects (normalized), except for the methods which
-return a string (see L<SYNOPSIS>).
+return a string (see L</SYNOPSIS>).
Some routines (C<is_odd()>, C<is_even()>, C<is_zero()>, C<is_one()>,
C<is_nan()>, etc.) return true or false, while others (C<bcmp()>, C<bacmp()>)
Each of the methods below (except config(), accuracy() and precision())
accepts three additional parameters. These arguments C<$A>, C<$P> and C<$R>
are C<accuracy>, C<precision> and C<round_mode>. Please see the section about
-L<ACCURACY and PRECISION> for more information.
+L</ACCURACY and PRECISION> for more information.
=head2 config()
that number will also be rounded.
In most cases, you should probably round the results explicitly using one of
-L<round()>, L<bround()> or L<bfround()> or by passing the desired accuracy
+L</round()>, L</bround()> or L</bfround()> or by passing the desired accuracy
to the math operation as additional parameter:
my $x = Math::BigInt->new(30000);
print scalar $x->copy()->bdiv($y, 2); # print 4300
print scalar $x->copy()->bdiv($y)->bround(2); # print 4300
-Please see the section about L<ACCURACY and PRECISION> for further details.
+Please see the section about L</ACCURACY and PRECISION> for further details.
Value must be greater than zero. Pass an undef value to disable it:
$P = CLASS->precision(); # read out global precision
$P = $x->precision(); # read out precision that affects $x
-Note: You probably want to use L<accuracy()> instead. With L<accuracy> you
-set the number of digits each result should have, with L<precision> you
+Note: You probably want to use L</accuracy()> instead. With L</accuracy()> you
+set the number of digits each result should have, with L</precision()> you
set the place where to round!
C<precision()> sets or gets the global or local precision, aka at which digit
numbers have digits after the dot. In L<Math::BigFloat>, it will round all
results to P digits after the dot.
-Please see the section about L<ACCURACY and PRECISION> for further details.
+Please see the section about L</ACCURACY and PRECISION> for further details.
Pass an undef value to disable it:
input is accepted as decimal, hex (with leading '0x') or binary (with leading
'0b').
-See L<Input> for more info on accepted input formats.
+See L</Input> for more info on accepted input formats.
=head2 from_oct()
This method was added in v1.82 of Math::BigInt (April 2007).
-See also L<blog()>.
+See also L</blog()>.
=head2 bnok()
This returns a normal Perl scalar from $x. It is used automatically
whenever a scalar is needed, for instance in array index operations.
-This loses precision, to avoid this use L<as_int()> instead.
+This loses precision, to avoid this use L<as_int()|/"as_int()/as_number()"> instead.
=head2 modify()
=head2 Alternative math libraries
You can use an alternative library to drive Math::BigInt. See the section
-L<MATH LIBRARY> for more information.
+L</MATH LIBRARY> for more information.
For more benchmark results see L<http://bloodgate.com/perl/benchmarks.html>.
-=head2 SUBCLASSING
+=head1 SUBCLASSING
-=head1 Subclassing Math::BigInt
+=head2 Subclassing Math::BigInt
The basic design of Math::BigInt allows simple subclasses with very little
work, as long as a few simple rules are followed:
=item brsft()
-For negative numbers in base see also L<brsft|brsft>.
+For negative numbers in base see also L<brsft|/brsft()>.
=back