Closed cryguy closed 3 years ago
With the following inputs, the muln result is wrong
new BN("400000000000000000000000", 10).muln(0.5).toString(10) // gives "48884270296371539476480" new BN("320000000000000000000000", 10).muln(0.5).toString(10) // gives "8884270296371539476480"
while doing the same thing but with divn works as expected
new BN("400000000000000000000000", 10).divn(2).toString(10) // gives "200000000000000000000000" new BN("320000000000000000000000", 10).divn(2).toString(10) // gives "160000000000000000000000"
Fractional numbers are not supported. Same as https://github.com/indutny/bn.js/issues/276.
With the following inputs, the muln result is wrong
while doing the same thing but with divn works as expected