3 ms·
throw new Error("dnum: decimals cannot be negative"); Does this mean what is says ? The library supports positive decimals only ?
by zaphirplane 3y ago
throw new Error("dnum: decimals cannot be negative");
Does this mean what is says ? The library supports positive decimals only ?
- bpierre 3y agoI should probably word this better. Numbers are represented in dnum using a pair of integer + precision decimals. For example, this is the number 1.0 with a precision of 18 decimals: [1000000000000000000n, 18] A number cannot have less decimals than none, so this is why this error exists.