Elm-bignum: arbitrary precision arithmetic package

Greetings,

My company, ChainPartners, has decided to open source the arbitrary precision arithmetic library we’ve been using internally. It supports basic arithmetic operations, sign operation, comparison, rounding, and square root.

https://package.elm-lang.org/packages/chain-partners/elm-bignum/latest/

We needed calculations for big numbers beyond JS’s 53 bit numbers, but Elm was lacking a package that met our specifications so we decided to build one. It was a lot of fun writing this library! Especially so when writing tests, as this was my first time writing this kind of library so I put a lot of effort into tests and I hope they are sturdy enough.

The performance is okayish, that is, it suits our needs. I think it could become much faster, but performance is lower in my priority since I believe that heavy calculations should not be done on browsers anyway.

I welcome all feedbacks and contributions!

17 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.