Replies: 4 comments
-
I had a similar problem, and I solved by writing convertor functions between You could do the same between But I agree that it would be useful to have some advanced math functions (logs, exp, sqrt) shipped with the canonical BigNumber type. |
Beta Was this translation helpful? Give feedback.
-
@clementbalestrat @PaulRBerg I've addressed this issue here. Hopefully it'll get merged. I've implemented the |
Beta Was this translation helpful? Give feedback.
-
This is great, thanks guys! @zeim839 would you be able to add |
Beta Was this translation helpful? Give feedback.
-
Also a couple of nice to have, which aren't in
|
Beta Was this translation helpful? Give feedback.
-
I'm trying to get rid of
BigNumber.js
in my dApp to only useBigNumber
from ethers but it looks like its API is quite limited.Some arithmetic operations are missing such as
sqr
, which would be quite difficult to implement from scratch.I was just wondering if it was possible to add more of these operations to
BigNumber
? I understand you are usingBN.js
which already has them all.Beta Was this translation helpful? Give feedback.
All reactions