June 11, 2007 at 2:09 pm
The result was for
select @a = 100001
select @b-2 = 800000
But it does not matter.
Take @a = 100000.001, @a = 10000.05, etc., whatever.
On any precision you choose I can provide endless number of values having ratio > 0.125 and rounded by BR to 0.12.
RE 2/3: you posted rounding for 0.66666666, not for 2/3.
Still waiting for anybody's code for 2/3.
_____________
Code for TallyGenerator
June 11, 2007 at 3:08 pm
Just so you all know, there are definately more than 5 that have been reading this since the beginning.
June 11, 2007 at 3:08 pm
Just so you all know, there are definately more than 5 that have been reading this since the beginning.
June 11, 2007 at 3:08 pm
Just so you all know, there are definately more than 5 that have been reading this since the beginning.
June 11, 2007 at 3:08 pm
Just so you all know, there are definately more than 5 that have been reading this since the beginning.
June 11, 2007 at 3:08 pm
Just so you all know, there are definately more than 5 that have been reading this since the beginning.
June 11, 2007 at 3:08 pm
Just so you all know, there are definately more than 5 that have been reading this since the beginning.
June 11, 2007 at 3:09 pm
June 11, 2007 at 3:47 pm
> Just so you all know, there are definately more than 5 that have been reading this since the beginning.
And some become quite exited about that.
Some time ago I celebrated 100th reply on this topic.
Now I wonder if it's time to celebrate 100th my reply on this topic.
_____________
Code for TallyGenerator
June 11, 2007 at 7:14 pm
Heh... obviously not a "precise" number, eh?
After seeing all the stuff about rounding on these interminable threads, I've decided I'm not rounding anything except the corners of the kitchen table I'm building Let the GUI guys do the rounding
--Jeff Moden
Change is inevitable... Change for the better is not.
June 11, 2007 at 7:30 pm
I would keep the kitchen table corners.
Just in case: mother-in-law visit or something...
_____________
Code for TallyGenerator
June 11, 2007 at 7:36 pm
Heh! Now THAT's useful info! You just talked me into putting nice sharp metal edges on it Maybe even spring-load the buggers I know... surplus bear traps
--Jeff Moden
Change is inevitable... Change for the better is not.
June 11, 2007 at 10:45 pm
So, class failed to provide code for bankers rounding of 2/3 and dismissed itself.
On my post #102 in this topic I can conclude:
Bankers Rounding either
- cannot round most of rational numbers or
- returns false results for some numbers.
Any of these conclusions proves that Bankers Rounding is not valid rounding function.
_____________
Code for TallyGenerator
June 11, 2007 at 11:58 pm
Banker's rounding rounds 2/3 in exactly the same manner as traditional rounding, no matter how many decimal places you'd like to extend .666... Is this another silly "midnight event" sidetrack which has nothing to do with the topic at hand? Again, an optimal banker's rounding function only differs from traditional rounding when the least significant digit is 5 (which is never true with 2/3), and when that digit is directly to the right of the least significant digit that is being displayed, stored, etc. In other words, in most situations, with a random distribution of numbers, banker's rounding and traditional rounding do the exact same thing with almost all numbers in the set. The only difference, and one meant to correct for the problem of traditional rounding skewing up slightly in that one situation, is how they handle numbers that are exactly halfway between two possible "final" numbers. Traditional rounding always goes up, while banker's rounding tries to split the difference, averaging out to remain exactly halfway. That is all. Nothing else, nothing to do with midnight, nothing to do with 2/3, nothing to do with anything other than eliminating that tiny bias that traditional rounding introduces with rare occurrences of very specific numbers. It does what it is meant to do, does so well, and does so predictably. It won't clear acne, introduce you to girls (or boys), cure the common cold, or win the Triple Crown, nor is that its intended purpose.
It's not magic, it's not meant to be universally implemented, and it's not radically different from traditional rounding. It's just a tool that is sometimes required, sometimes optional but optimal, sometimes not desired, and sometimes safely left in the toolbox.
To your other silly claims:
Banker's rounding can round rational numbers just fine, and rounds the vast vast vast majority of them in exactly the same way as traditional rounding, with the rare exception noted above.
Banker's rounding doesn't return "false results" any more than any other method of rounding or truncating a number, it returns perfectly predictable results which may or may not fit the business purpose at hand.
June 12, 2007 at 12:07 am
I asked for code where BR function rounds 2/3.
The only version I've got was rounding 0.66666666.
But you claimed that 0.66666666 is 0.66666666(0) and not anything else.
2/3 = 0.66666666(6), so that code did not round 2/3.
Still waiting for the proof that BR function can round 2/3.
_____________
Code for TallyGenerator
Viewing 15 posts - 241 through 255 (of 373 total)
You must be logged in to reply to this topic. Login to reply