-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Float operations are not precise (0.1+0.2=0.30000000000000004), so don't use them for monetary calculations.
There are two workarounds to this:
1 (simple but not scalable) - convert the floats to integers, do the operations, then convert them back to floats
2 (complex but scalable) - create a class that handles the data (idea by Martin Fowler). There are a few libraries to do that, like Dinero.js
I think loanAmount and apr are the two variables that can be floats.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request