Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Math::round not rounding correctly (string)

by tye (Sage)
on Dec 23, 2014 at 20:39 UTC ( [id://1111232]=note: print w/replies, xml ) Need Help??


in reply to Re: Math::round not rounding correctly
in thread Math::round not rounding correctly

A better "work-around" to what is arguably "correct" behavior would be:

$l=Math::Round::round("$x"); # Math::Round::round($x) # vs. this

If what you care about is how the rounding compares to the string output for the number, then what you should be rounding is the string output, of course.

- tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1111232]
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-03-29 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found