Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: strange rounding

by Anonymous Monk
on Nov 29, 2004 at 12:39 UTC ( [id://410907]=note: print w/replies, xml ) Need Help??


in reply to strange rounding

btw, even
12400/10 => 1239.9 ?? and 12400*0.1 => 1239.9
having stange results. But PLEASE don't tell me that I have to convert
those numbers into strings and re-formate them (like):
s/(\d*)(\d\d)/$1.$2/ or $price = substring(..).'.'.substr(..) (I asume that s/../../ is exactly doing this)
Carl

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-23 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found