I have a number 7.471E-35 occurring in my code. When I use the add() function from this library it incorrectly rounds or truncates this to 0:
node
Welcome to Node.js v14.18.1.
Type ".help" for more information.
> const {add} = require('sinful-math');
undefined
> b = 4.761E-35
4.761e-35
> add(b,0)
0
> b+0
4.761e-35
>
- Result:
0
- Expected result:
4.761e-35
I have a number
7.471E-35occurring in my code. When I use theadd()function from this library it incorrectly rounds or truncates this to 0:04.761e-35