Rounding Algorithms
dtmos writes "Clive Maxfield has an interesting article up on PL DesignLine cataloging most (all?) of the known rounding algorithms used in computer math. As he states, "...the mind soon boggles at the variety and intricacies of the rounding algorithms that may be used for different applications ... round-up, round-down, round-toward-nearest, arithmetic rounding, round-half-up, round-half-down, round-half-even, round-half-odd, round-toward-zero, round-away-from-zero, round-ceiling, round-floor, truncation (chopping), round-alternate, and round-random (stochastic rounding), to name but a few." It's a good read, especially if you *think* you know what your programs are doing."
1.44th post!
Round down and put the extra aside. Say, in your own account. Like the have-a-penny-need-a-penny jar at the local Gulp-n-Blow.
my favorite rounding algorithm is pi(r)^2.
The theory of relativity doesn't work right in Arkansas.
- Mountain Dew
- Couch
- Lack of willpower
- Utter disdain for annual resolutions I made less than a week ago
- DiGiorno's pizzas.
Seems to work.I think you mean:
Round-up, Round-down, get around-toward-nearest,
I get around-half-up,
Yeah,
Get around-half-down, round-half-even, round-half-odd, I get around-toward-zerowooooooHHHHooo!
blarg.
I don't think I know what my programs are doing all the time... :)
I just hope they play nice when I'm not watching.
Why would my wife being pregnant be a problem?
:)
You'll know 13 years from now
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
[Fuck Beta]
o0t!
So it turns out instead of 2, there are more like 9 different types of people.
The classics:
Those who round a glass of water up (Has been filled)
Those who round it down (Has been emptied)
The oddballs:
The round-half-up crowd(Half or greater is filled)
The round-half-down crowd(Half or less is empty)
The round toward zero types(Always empty)
The round away from zero groupies(Always Full)
The round alternate weirdos(They get interesting when you give them two glasses)
The round random subset(Carry around a coin or die to decide such problems)
And finally...
The truncate ones who cannot handle such a problem and smash the glass to make sure it is empty.
If this signature is witty enough, maybe somebody will like me.
Really? I thought it was more like:
And thus began the slide of Vegas casinos into insolvency.
Rounding? Real men use a confidence interval anyway, so rounding is irrelevant.
Simon's Rock College
If you can't carry out your 13 year old, either they need a diet or you need more excercise.