Current behavior
console.log(AutoNumeric.format(<A floating point number that is very close to 0>, AutoNumeric.getPredefinedOptions().percentageUS3dec))
outputs 10.000%.
Expected behavior
Outputs 0.000%.
Steps to reproduce the problem
- Copy and paste the following to
package.json:
{
"type": "module",
"dependencies": {
"autonumeric": "^4.10.5"
}
}
-
Run npm install.
-
Copy and paste the following to a.js:
import AutoNumeric from "autonumeric";
console.log(AutoNumeric.format(0.0000000000000000001, AutoNumeric.getPredefinedOptions().percentageUS3dec));
- Observe the output (which is
10.000% in my setup).
Current behavior
outputs
10.000%.Expected behavior
Outputs
0.000%.Steps to reproduce the problem
package.json:{ "type": "module", "dependencies": { "autonumeric": "^4.10.5" } }Run
npm install.Copy and paste the following to
a.js:10.000%in my setup).