I think I see a problem.
10.8601 cannot be represented perfectly, and therefore, as long as rounding to 13575.125 works fine, it's hard to make it round to 0.13, because adding 0.005 is simply not quite available. And to make matters worse, 0.005 also has no exact idea, so you get a little less than 0.13.
Then your choice should round up twice, once to three digits, and then once to 2, or perform the best calculation to start with. Using a long or high-precision format, scale it to 1000 to get * .125 to * 125. Perform rounding using exact integers.
By the way, it’s not quite right to say that one of the endlessly repeating “floating point” variations is inaccurate or that it always causes errors. The problem is that the format can only represent fractions, which you can summarize negative powers to create two. Thus, from a sequence of 0.01 to 0.99, only 0.25, 0.50 and 0.75 have accurate representations. Therefore, FP is best used, ironically, by scaling it so that only integer values ​​are used, then it was as accurate as integer arithmetic of the data type. Of course, then you could just use fixed-point integers to start with.
Be careful scaling, say, from 0.37 to 37, until rounded. A floating point can be used for monetary values, but it works more than it costs, and, as a rule, the necessary experience is not available.
source share