Bankers Rounding

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

    _____________
    Code for TallyGenerator

  • Why would you keep waiting for code that was supplied in the second post on page 30, right after you asked for it?

  • 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.

    _____________
    Code for TallyGenerator

  • Sergyi, I want you to pay me 1.0450000000000001 dollar for consulation.

    Can you do that?

    How are you going to pay me that 100 atto-dollar?

     


    N 56°04'39.16"
    E 12°55'05.25"

  • There is rounding for this.

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

    _____________
    Code for TallyGenerator

  • Maybe you loose one cent one time, and win one cent another time?

     


    N 56°04'39.16"
    E 12°55'05.25"

  • I'll lose both times:

    1.0450000000000001

    and

    1.0449999999999999

    will both be rounded down.

    _____________
    Code for TallyGenerator

  • So you loose half a cent two times? 1 cent in total?

    Charge one cent more to client?

     


    N 56°04'39.16"
    E 12°55'05.25"

  • If you are happy to be charged more just because rounding function I use produces errors time to time...

    You know, I can add a whole lot of actual and possible flaws in my systems I would like to charge client for.

    Ready to pay?

    _____________
    Code for TallyGenerator

  • If I thought you are doing a great job, yes. But I don't.

    Why do you think it is SO unfair to "loose" half a cent?

     


    N 56°04'39.16"
    E 12°55'05.25"

  • Why don't you think I'm doing great job?

    Does your opinion depends on amount charged?

    It's unfair either to lose or gain extra half cent.

    There is a rule - round to the closest cent.

    Closest cent is 1.05.

    And if some freaky function returns 1.04 it's unfair, no matter who loses and who gains.

    _____________
    Code for TallyGenerator

  • Who says that rule is the only one available on the earth?

    We use another strategy: all cents >= 0 and < 50 rounds down and all cents >= 50 and < 100 rounds up.

    Is this fair?

     


    N 56°04'39.16"
    E 12°55'05.25"

  • Half of dollar is goind down, half of dollar is going up - sounds absolutely fair.

    _____________
    Code for TallyGenerator

  • That is what rounding is all about!

    Some will loose and some will gain. Next time it can be the other way round.

    I don't mind spend half a cent due to a rounding rule. I can always increase my income by raising my hour charge to customer with 1 dollar per hour. I can also introduce a "invoice handling amount".

    How do you measure if that is fair?

     


    N 56°04'39.16"
    E 12°55'05.25"

  • So, what all this was about?

    You described traditional rounding rule, accepted everywhere as a standard procedure.

    I accept this rounding as a valid method and use it.

    BR breaks this rule, so it's not appropriate.

    What did you try to add to this discussion?

    _____________
    Code for TallyGenerator

Viewing 15 posts - 301 through 315 (of 373 total)

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