If one does calculations like 0.01 * 100 and tries to apply bit operations on it afterwards, the bit operations will not work as intended, because 0.01 * 100 = 0.9999999999 (or similar). Casted to an int, this number is identical to 0.
Analysis:
The description already contains all necessary information. It can be solved by replacing the direct cast to int with a function, which will use rint(), if the number is quite close to the near int.
Implementation:
The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.
Documentation:
The fix was documented in the changes log. Further documentation not needed.
Tests:
The fix was added to the automatic tests. No deviation detected. Bug fix implemented successfully.
Anonymous
Diff:
Diff:
Diff:
Diff: