Forum Replies Created

Viewing 15 posts - 4,051 through 4,065 (of 6,036 total)

  • RE: Bankers Rounding

    There is rounding for this.

    But I don't want to lose a cent because BR produces wrong result.

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

    David,

    if you are given with number 1.0450000000000001 (or 2/3) but you have only DECIMAL(18,6) storage for this, how can you produce right result from Bankers Rounding?

    Can you post some...

  • RE: Bankers Rounding

    That code did not supply 2/3.

    It supplied (in your terms) precise number 0.66666666 which is < 2/3.

    I'm waiting for a code supplying 2/3 to BR function.

  • RE: Help with this query plz?

    But it can be used in stored procedure...

    Yes, you cannot use SP call in select statement, but if you're bad enough to pass...

  • RE: Bankers Rounding

    Still waiting for the code supplying 2/3 to BR function as a parameter.

  • RE: Bankers Rounding

    I know at least one another person in this thread who thinks .666 is proper representation for 2/3. So, I'm not the only one.

    And I know that this representation is...

  • RE: Bankers Rounding

    Jacek0, if you read again my posts from the beginning you'll see that I did not try to stop anybody from using BR in accounting where it's required (btw, it's...

  • RE: Bankers Rounding

    There is no inbuilt ROUND()

    Where did you see any reference about built-in ROUND() in 2./3?

    Result 0.666000 is correct if you take into consideration actual precision of the value.

    You've got 3...

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

    Sorry David,

    error was not on my side.

    Error was in absence of documenting the changes in the function usage.

    It's developer's fault, not user's.

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

    Sorry, there was no comment about change in using of parameter.

    I tried:

    DECLARE

    @enumerator DECIMAL(38, 12)

    ,@denominator DECIMAL(38, 12)

    SELECT

    @enumerator = 5

    ,@denominator = 111.111

    SELECT

    dbo.fn_BRound2(@enumerator/@denominator, 2)

    ,Round(@enumerator/@denominator,2)

    Result:

    .0400.050000

    Still need to try harder.

  • RE: Bankers Rounding

    > Banker's rounding, written properly will return the exact same results as traditional rounding for 2/3. I've said that repeatedly now, and I won't be changing my mind, but keep...

  • RE: Bankers Rounding

    Don't change topic.

    It was not about result of ROUND.

    It was about valid decimal representation of 2/3.

    What ROUND() is doing in you post?

    P.S. David, you're starting to make funny noises.

    Control yourself.

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

    Here is the need to provide for:

    select dbo.fn_BRound(10./7998*1000, 100)

  • RE: Bankers Rounding

    What do you think is the result of

    select 2./3000 * 1000

    Is it actually 2/3?

    Is it valid representation for 2/3?

    Now try with

    select 10./7998*1000

    How precise is your result?

    Is it actually...

  • RE: Bankers Rounding

    "So,

    WHY

    0.666 is valid 3 digits precision representation of 2/3"

    It's not. The valid 3 digit precision representation of 2/3 is 0.667. Did the devil make you do that?

    </I?

    Really?

    Did you see numbers...

Viewing 15 posts - 4,051 through 4,065 (of 6,036 total)