Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Variables are automatically rounded off in perl

by Anonymous Monk
on Jul 26, 2016 at 04:59 UTC ( [id://1168530]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Variables are automatically rounded off in perl
in thread Variables are automatically rounded off in perl

No, it doesn't. JavaScript does not truncate digits. Try it:

javascript:alert(3335.9999999999995)

Replies are listed 'Best First'.
Re^4: Variables are automatically rounded off in perl
by Anonymous Monk on Jul 26, 2016 at 07:14 UTC

      Yes, exactly. The topic under discussion here is float to string conversion. Perhaps the OP choice of title words "rounded off" was somewhat unfortunate. Perhaps "double roundup" would've been more accurate. See roundup.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-29 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found