0
When making sums of decimal values in Javascript (in the example with two decimal places). Sometimes the sum generates a result with 'n' decimal places other times not.
The question is:
Why does that happen?
How to standardize the result the way you want it.
Example.
document.getElementById("exemplo").innerHTML = 1.25+1.36
document.getElementById("exemplo2").innerHTML = 1.25+1.37
<div id="exemplo"></div>
<div id="exemplo2"></div>
Use the toFixed() to round and round up this question: Javascript floating point account realization with absolute precision
– Luiz Augusto
above as in the comment above, of a researched on mathematical functions in js
– Luan Brito