ionspin / kotlin-multiplatform-bignum

A Kotlin multiplatform library for arbitrary precision arithmetics
Apache License 2.0
345 stars 41 forks source link

ArithmeticException on repeating decimal when scale is set #231

Closed sproctor closed 2 years ago

sproctor commented 2 years ago

BigDecimal.divide() should not throw ArithmeticException at https://github.com/ionspin/kotlin-multiplatform-bignum/blob/873a770296389e77e9cb3cbe8b402e05f5b1062b/bignum/src/commonMain/kotlin/com/ionspin/kotlin/bignum/decimal/BigDecimal.kt#L1276 if scale is set.

ionspin commented 2 years ago

Thanks for reporting!

ionspin commented 2 years ago

Fixed in 9175878d4b7e6b, will be available in 0.3.7-SNAPSHOT once the build completes.