My requirement involves operating on Big Numbers, and I need the results to maintain precision, as demonstrated below:
const BN = require('bn.js');
var a = 11060622312717714974
var b = 1570481433500000000000;
console.log(a/b); //0.0070428227146040415
However, when attempting to utilize Big Number functionality, the result only returns 0
without any precision:
var aBN = new BN('11060622312717714974');
var bBN = new BN('1570481433500000000000');
console.log(aBN.div(bBN).toString()); //0
My question is whether it's possible to achieve accurate results with this library?