3 ms·
There are some libraries for dealing with currency. I don't remember the names. But more importantly, what exactly are you trying to do? It sounds like you wan
by giantg2 4y ago
There are some libraries for dealing with currency. I don't remember the names.
But more importantly, what exactly are you trying to do? It sounds like you want to convert floats to percents and back again to get the same exact values. Double or BigDecimal should be fine to get back to the second decimal place in your scenario. I don't have a proof for that, but you could generate tests and data to test your system. If you're really concerned about getting the original values back, the. You can create an audit table to preserve them, depending on how this scenario is applied in real life.