Closed contractsolidity closed 7 months ago
console.log(
new BigNumber("2.5775384794659629771166494749061e+26")
.minus("2.5775384794659629771166494749061e+26")
.toString()
);
// "0"
const x = 2.5775384794659629771166494749061e26;
const y = 2.5775384794659629771166494749062e26;
// ^
console.log(x === y);
// true
You need to use strings, not numbers.
console.log(new BigNumber(2.5775384794659629771166494749061e+26).minus('2.5775384794659629771166494749061e+26').toString())
result 2288335052.50939