Is double precision floating point really so unreliable?
This is peoples *money* you are dealing with James so I think you should not be so cavalier and actually understand how things work (or pay someone else to do the job *properly*).
If you take such shortcuts then your code will just end up as "junk" down the track.
I am sure there is some equivalent C code around and the code I wrote there could be reduced (as a lot of functionality it has you wouldn't need).
Would you be so kind as to educate me on how using double precision is being cavalier? I have used floating point a lot, even for iterative computations. For a gateway, all user facing operations have a very short length, eg. one maybe two operations. How will errors in the 14th decimal place matter when 1 satoshi is 12 decimal place even for 1000 deposit.
I am all for super precision, so once I understand the actual problem I will do what it takes to make it precise.
Please help me understand the issue. I read
https://bt.irlbtc.com/view/13837.0 and nothing in here convinces me that doing a single subtract will change the value of any deposit or withdrawal, down to 1 satoshi.
Also, the gateway code will be run in controlled environments and I will specify compiler, options, etc.
Again, please provide a specific example of precision problem that a gateway doing deposits and withdrawals will run into. What if I used 128bit floating point?
James