Description:
We're encountering floating-point precision issues when performing arithmetic with decimal numbers. For example, multiplying 16.67 * 100 results in 1667.0000000000002 instead of the expected 1667. This is due to how JavaScript (and most programming languages) handle floating-point numbers using the IEEE 754 standard, which cannot represent all decimal fractions precisely in binary.
Impact:
This causes inconsistencies in calculations, especially when:
Comparing numbers for equality
Using results in currency/financial operations
Displaying values to end users
Examples:
16.67 * 100 // 1667.0000000000002 โ
1.005 * 100 // 100.49999999999999 โ Suggested Fix:
Apply rounding consistently after calculations that involve floating-point numbers. For example:
Math.round(value * 100) parseFloat((value * 100).toFixed(2))
this happens for example while cacluating the recurring coupon amount that


fix this and other occurances
Please authenticate to join the conversation.
Completed
Bug & Fixes
10 months ago

Abdulmelik Ambaw
Get notified by email when there are changes.
Completed
Bug & Fixes
10 months ago

Abdulmelik Ambaw
Get notified by email when there are changes.