Help for this page

Select Code to Download


  1. or download this
    $x->digit($n);          # return the nth digit, counting from right
    $x->digit(-$n);         # return the nth digit, counting from left
    
  2. or download this
    13:45 >perl -MMath::BigFloat -wE "my $n = Math::BigFloat->new(123); sa
    +y $n; say $n->digit(-1);"
    123
    ...
            C:\Perl\Strawberry\strawberry-perl-5.18.2.1-64bit-portable\per
    +l\lib\Math\BigFloat.pm: 1.998
    
    13:46 >