Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How do I round a number?

by Mago (Parson)
on Jul 09, 2003 at 19:25 UTC ( [id://272801]=note: print w/replies, xml ) Need Help??


in reply to How do I round a number?

If you are using integers, and want to use Math::BigInt:


Math::BigInt - Arbitrary size integer math package

DESCRIPTION

All operators (inlcuding basic math operations) are overloaded if you declare your big integers as

  $i = new Math::BigInt '123_456_789_123_456_789';

(snip)


METHODS

round

$x->round($A,$P,$round_mode); # round to accuracy or precision using + mode $r

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-24 19:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found