file this under if you ever wonder why accountants go nuts...
i wrote a little program to compute some numbers on buy, sells and splits of investment shares. in researching it i found out about things i didn't know before (a newer programming language (Python) that has a data type (Decimal) that does things very accurately and is also very specific about how you can check for failures, etc.) so that is fun, but also as a computer science student of many years ago i also knew that dealing with fractional amounts can be quite an interesting issue/challenge.
i put my program out there for other people to use. i didn't completely test it as i did admit it was a rather hacked together thing and not formally developed. so errors did appear and i've been correcting them as i go along when i get time to go back and poke at it some more.
one of the interesting things i learned was that it depends upon where you were taught rounding it can be different, there are many different kinds of rounding methods and i assumed the one called bankers rounding was the right one. nope, at least not for my brokerage account. surprise!
today i'm working on this and seeing if i can figure out all the quirks i need to work around and then i see yet another example of a different but related issue of where the stock brokerage has alternative values that it shows (in some cases it reports one value, but if you look at it in another view you may see it being slightly different which can change your results by a fraction). when things are shown in an inconsistent manner which one do you pick? eventually this does become important for tax reporting purposes...
and then that gets me to where i have the same sort of beef with my insurance annuity company that doesn't give enough digits to calculate the results to match what appears on their statements.
whatever hair i might have left will soon be torn out...