Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Using the Math::BigFloat->digit() method

by Khen1950fx (Canon)
on Apr 23, 2014 at 07:58 UTC ( #1083292=note: print w/replies, xml ) Need Help??


in reply to Using the Math::BigFloat->digit() method

Just use Math::BigInt:
#!/usr/bin/perl use v5.10; use strict; use warnings; use Math::BigInt lib => 'FastCalc'; my $n = 123; my $x = Math::BigInt->new($n); say $x; say $x->digit(-1);

Replies are listed 'Best First'.
Re^2: Using the Math::BigFloat->digit() method
by Anonymous Monk on Apr 23, 2014 at 09:35 UTC

    Q: How do I Math::BigFloat->digit() ??

    A: Khen1950fx says Just use Math::BigInt:

    That is pure genius Khen1950fx and completely answer the question, I love you

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1083292]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2019-05-25 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (152 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!