Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^5: number comparison with a twist

by pryrt (Prior)
on Mar 02, 2020 at 16:10 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2020-06-02 15:34 GMT
Find Nodes?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?

    Results (19 votes). Check out past polls.