Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: number comparison with a twist

by pryrt (Abbot)
on Mar 02, 2020 at 16:10 UTC ( [id://11113647]=note: print w/replies, xml ) Need Help??


in reply to Re^4: number comparison with a twist
in thread number comparison with a twist

A quibble: truncating is the wrong thing to do, and is the problem with your original int() solution in the first place. Rounding to the nearest cent is the right thing to do (which can be done through round() as I suggested, or using the sprintf() solutions that others have mentioned).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found