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

Re^3: Variables are automatically rounded off in perl

by Anonymous Monk
on Jul 26, 2016 at 04:59 UTC ( #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? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2022-05-22 12:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?