> Do CPUs support doing math directly with BCD values
Perhaps surprisingly to some, x86 has instructions for BCD manipulation at the CPU level. Legacy.
In IBM POWER 6 this returned as an optimisation in hardware.
https://books.google.ch/books?id=SPXHAgAAQBAJ&pg=PA44&lpg=PA...
The issue with BCD would be data store support and CPU support right? Do CPUs support doing math directly with BCD values and does your DB support doing math directly with BCD values?
In any case, using floating point for any currency calculations is a huge no-no, even though a lot of things do it anyway.
I work with Magento daily and all their currency math uses PHP floats and the rounding errors drive me bonkers.