···1111-------------
1212Perl can also store decimal numbers as strings, but the builtin arithmetic operators will convert them to integer or floating-point values to perform the operation.
13131414-The Math::BigFloat extension provides an arbitrary-precision [decimal type](/formats/exact/):
1414+The <code>Math::BigFloat</code> extension provides an arbitrary-precision [decimal type](/formats/exact/):
15151616 use Math::BigFloat ':constant'
1717 my $f = 0.1 + 0.2; # returns exactly 0.3
18181919-The Number::Fraction extension provides a fraction type that overloads the arithmetic operators with [symbolic](/formats/exact/) fraction arithmetic:
1919+The <code>Number::Fraction</code> extension provides a fraction type that overloads the arithmetic operators with [symbolic](/formats/exact/) fraction arithmetic:
20202121 use Number::Fraction ':constants';
2222 my $f = '1/2' - '1/3'; # returns 1/6
23232424-The Math::BigRat extension provides similar functionality. Its advantage is compatibility with the Math::BigInt and Math::BigFloat extensions, but it does not seem to support fraction literals.
2424+The <code>Math::BigRat</code> extension provides similar functionality. Its advantage is compatibility with the
2525+<code>Math::BigInt</code> and <code>Math::BigFloat</code> extensions, but it does not seem to support fraction literals.
25262627How to Round
2728------------
···35363637Note that this implicitly uses [round-to-even](/errors/rounding/). The variable <code>$#</code> contains the default format for printing numbers, but its use is considered deprecated.
37383838-The Math::Round extension provides various functions for rounding floating-point values:
3939+The <code>Math::Round</code> extension provides various functions for rounding floating-point values:
39404041 use Math::Round qw(:all);
4142 $result = nearest(.1, 4.567) # prints 4.6
4243 $result = nearest(.01, 4.567) # prints 4.57
43444444-The Math::BigFloat extension also supports various [rounding modes](/errors/rounding/):
4545+The <code>Math::BigFloat</code> extension also supports various [rounding modes](/errors/rounding/):
45464647 use Math::BigFloat;
4748 my $n = Math::BigFloat->new(123.455);
···5556* [Math::Round extension](http://search.cpan.org/dist/Math-Round/Round.pm)
5657* [Number::Fraction extension](http://search.cpan.org/~davecross/Number-Fraction-1.13/lib/Number/Fraction.pm)
5758* [Math::BigRat extension](http://search.cpan.org/~flora/Math-BigRat-0.26/lib/Math/BigRat.pm)
5858-* [Math::BigFloat](http://search.cpan.org/~flora/Math-BigInt-1.95/lib/Math/BigFloat.pm)
5959+* [Math::BigFloat extension](http://search.cpan.org/~flora/Math-BigInt-1.95/lib/Math/BigFloat.pm)
5960