Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Dividing and format

by tadman (Prior)
on Nov 27, 2003 at 17:46 UTC ( [id://310567]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Dividing and format
in thread Dividing and format

It's probably storing "127" as 126.9999999999999 which rounds down with the int function. Aren't floating point numbers fun?

The documentation for int suggests that the POSIX::floor function is a better selection for this kind of work.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://310567]
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: (5)
As of 2024-04-19 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found