js-big-decimal
js-big-decimal copied to clipboard
Wrong result when adding any number to -0
Describe the bug Wrong result when adding any number to -0
To Reproduce
const n1 = new bigDecimal('-0');
const n2 = new bigDecimal('10');
const diff1 = n1.add(n2);
print(diff1.getValue()); // Will print -890
Expected behavior The result should be 10
Additional context If the operation is adding -0 to 10 the result will be correct.