Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Rounding over numbers [Perl6]

by u65 (Chaplain)
on Feb 15, 2016 at 16:20 UTC ( [id://1155265]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -e 'printf "13.24 rounds to %.*f0\n", 1, 13.24';
    13.24 rounds to 13.20
    ...
    
    $ perl -e 'printf "13.26 rounds to %.*f0\n", 1, 13.26';
    13.26 rounds to 13.30
    
  2. or download this
    > say sprintf("13.24 rounds to %.*f0", 1, 13.24);
    13.24 rounds to 13.20
    ...
    
    > say sprintf("13.26 rounds to %.*f0", 1, 13.26);
    13.26 rounds to 13.30
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1155265]
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-24 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found