Round to Even (aka Banker''s Rounding) - The final function

  • No, David is talking tolerances.  Depending on the scale, the tolerance is + OR - a specific % or weigt.  This tolerance will be dependent on the scales usage and requirements.  A scale used in a grocery store may have a tolerance of +/- 1%.  A scale used in measuring gold or silver may have a tolerance of 0.01%.

    You may want to take the time to read what is posted, not jump to conclusions.

  • You may want to take time to explain what is the actual weight when weights display 0.0 lbs.

    _____________
    Code for TallyGenerator

  • Lynn, don't take the bait, as we both know that he knows that we're referring to tolerances. If a scale has a tolerance of 0.1 lbs, and I put a 0.1 lb weight on it, it's perfectly acceptable for it to display 0.0. You know that, he knows that, and everyone else knows that. He's just trying to gloss over the fact that he has nothing to back up his statements, while we've provided concrete proof to reinforce our's.

    It's sort of like his various tangents such as "midnight events" (I still see pumpkin carriages when I think of this one), 1/3, and 2/3, none of which had anything to do with the topic. I'd recommend just ignoring him here while educating those who come with serious questions, such as rlively.

  • The matter of fact - you both have nothing to answer on the simple question without humiliating yourself.

    _____________
    Code for TallyGenerator

  • David, Ignore who?

  • Oooops!

    Suckers shitted their pants...

    Again!

    _____________
    Code for TallyGenerator

  • rlively,

    I hope you don't have problems with answering the question what's the weight of the feather on your scales if scales display 0.0 lbs.

    And ypo not gonna have problem with figuring out when scales will switch to 0.1 if you donna add feathers on it one by one.

    Then you not gonna have any problem to figure out what does it mean when scales show 12.5 and which way this value should be rounded.

    Sergiy says that whatever number is stored in the database isn't precise

    It's easy to check.

    Open BOL and read about datatypes.

    Every one has the limit of precision specified.

    No datatype decribed as holding absolute precise numbers. Because it would be insane.

    and the other side trusts whatever value is stored in the database as the true, accurate value

    They can trust in whatever they're confortable with. Small problem - computers don't have storage for absolutely precise decimal values.

    Oops...

    _____________
    Code for TallyGenerator

  • Sergiy,

    And you still refuse to provide the citation in New Zealand Law that prohibits the use of BR.  What, are you having problems finding the facts to back up your claim?

  • This will be my last post - on this thread.

    It may be my last post on this forum - no threat implied.

    I thus invite everyone

    who wants or needs

    to say one last thing

    to do so now

    or forever hold your peace.

    May I suggest it be something - that does not incite.

    May I suggest it be something - that is positive.

    May I suggest it be something - that is constructive.

    May I suggest it be something - that is nice.

    Believe me - it may not be easy!

    Look deep inside you.

    Believe me - it's there.

    If not - take another look.

    No justifications - please!

    You found it!

    Peace.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Please.

  • Regarding "No datatype described as holding absolute precise numbers...", this quote from Books Online seems to contradict you:

    Using decimal, float, and real Data

    The decimal data type can store a maximum of 38 digits, all of which can be to the right of the decimal point. The decimal data type stores an exact representation of the number; there is no approximation of the stored value.

    Can you please elaborate on this apparent contradiction? Note please that it is not my intent to attack you, I'm simply trying to understand what appears to me to be an inconsistency. I'm fully able to accept that SQL Server is insane, not necessarily based on this one occurance but through my experience with other aspects of it.

  • No one is denying or questioning that you can store a precise value, say 1.25 followed by an infinte number of zeroes, into a SQL Server decimal data type that can handle up to 38 digits (before or after the decimal point). What is being discussed is that the BR rounding function is applied to values that are calculated and most of which cannot be represented precisely in any computer data type.

    Thus if my boss comes to me and says that he will decrease my salary by one third and even threatens me that he will apply BR rounding on the decreased value, will I faint because he decreased my salary by one third or because he applied BR rounding? Even if I'm a super rich philanthropist officially earning 1 dollar a year (oops 1 euro a year), the decrease in salary wouldn't matter much.

    Of course, we all agree that my boss is not very wise to make this kind of threat (notice, I didn't use the word stupid).

  • I realize what the original discussion is about and I have no particular concerns there. What concerns me is the disconnect between what Books Online says and what Sergiy said, given as how he said to look in Books Online.

    I "opened BOL and read about datatypes". SQL Server is perfectly capable of storing precise representations of decimal values, so it does not seem very accurate to say "No datatype described as holding absolute precise numbers", if we assume Books Online is the authority in this case.

    It would probably be more accurate to say "no datatype in SQL Server is capable of representing every possible numeric value with perfect precision". 1/3 is a good example of that. If this was the intent then I apologize for misunderstanding.

  • dmbaker,

    in definition of datatype "DECIMAL (s, p)" what is "p"?

    What is the range of possible values of "p"?

    Absolutely precise numbers must have p = infinity.

    Can you specify such datatype?

    _____________
    Code for TallyGenerator

  • Yeah, OK, whatever. Would you please, as I originally asked, elaborate on the apparent contradiction between your statement:

    No datatype decribed as holding absolute precise numbers. Because it would be insane.

    And what Books Online says:

    The decimal data type stores an exact representation of the number; there is no approximation of the stored value.

    I think the disconnect is what you mean by "precise" and what SQL Server means by "exact representation". To me, they mean the same thing, but to you they apparently do not. Would like to understand more why that is and what you base it on (e.g. do you have any citations that I may refer to, as opposed to anecdotal sources).

  • Yeah, OK, whatever. Would you please, as I originally asked, elaborate on the apparent contradiction between your statement:

    No datatype decribed as holding absolute precise numbers. Because it would be insane.

    And what Books Online says:

    The decimal data type stores an exact representation of the number; there is no approximation of the stored value.

    I think the disconnect is what you mean by "precise" and what SQL Server means by "exact representation". To me, they mean the same thing, but to you they apparently do not. Would like to understand more why that is and what you base it on (e.g. do you have any citations that I may refer to, as opposed to anecdotal sources).

Viewing 15 posts - 331 through 345 (of 378 total)

You must be logged in to reply to this topic. Login to reply