Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Re: Re: (Golf) Formatting Integer To Money

by larryk (Friar)
on Aug 29, 2002 at 20:55 UTC ( [id://193910]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: (Golf) Formatting Integer To Money
in thread (Golf) Formatting NumberTo Money

Actually, this is the expected rounding. If you think about it, only half of them should round up (and the other half down) since that will give a more accurate average. In this case .125 rounds down, if you try .135 it will round up and .145 will round down.
   larryk                                          
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"
  • Comment on Re: Re: Re: Re: (Golf) Formatting Integer To Money

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-09-17 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.