Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: NV/IV Bug ?

by Steve_p (Priest)
on Feb 27, 2003 at 19:18 UTC ( [id://239211]=note: print w/replies, xml ) Need Help??


in reply to NV/IV Bug ?

int() always rounds down. In cases where you are working with floating-points, the precision may not be what you expect. So, to paraphase perldoc -f int, your 395 and 115 may look more like 394.99999943242 or 114.999999523523. In either case, the decimal portion is truncated off. Instead, sprintf, printf, POSIX::floor, or POSIX::ceil may be better options for what you want to do.

Log In?
Username:
Password:

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

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

    No recent polls found