Arbitrary-precision arithmetic package for Elm
Elm library for arbitrary-precision decimal arithmetic that supports basic arithmetic, comparison, and rounding operations.
I initially wrote this library because I needed division operation of big decimal numbers. My goal was to write a library that:
- Supports basic arithmetic operations
- Has okay performance on browser
- Improve handling of fraction digits that are dropped off in
moveZeroesToE
function. They are currently being truncated but should be rounded. - Get rid of
Maybe.withDefault
calls in Decimal module if possible. - Improve performance, especially for division and square root operations.
- Add base conversion, including experimentation with changing default base to 2^26.
- Reimplement
toString
functions usingParser
library. - Find a better way to handle operations on last digits of
Significand
without relying onInteger.toString
. Current implementation uses string manipulation using regular expression, as my initial implementation using recursion was crushingly slow. - Implement IEEE 754-2019 specifications.