Skip to content

Releases: ionspin/kotlin-multiplatform-bignum

Kotlin 1.9.21, wasmJs, bugfixing

28 Jan 09:46
6ab1048
Compare
Choose a tag to compare
  • Bump to kotlin 1.9.21
  • Expanded BigInteger API to expose bitLength as proposed by #254
  • Added wasm-js target
  • Fix for #269, thanks to @CodeServant
  • Fix for #276, BigDecimal divrem was not rounding properly
  • Fix for #277, round half to even was wrong when exponent was 0

Kotlin 1.8.10, bugfixing

11 Feb 12:06
281d0e7
Compare
Choose a tag to compare

Bump to Kotlin 1.8.10
Fix for #253, empty string is not a valid floating point number any more and parsing it throws ArithmeticException
Fix for #245, division test failures run in coroutines were ignored.
Expanded BigInteger API to expose bitLength as proposed by #254

Smaller bugfixes, kotlin update

06 Aug 21:05
Compare
Choose a tag to compare
  • Bump to Kotlin 1.7.10
  • Fix for #239, toPlainString which was supposed to return same result as JVM was truncating zeroes when scale was used.
  • Fix for #238, wrong exponent in resolved decimal precision was used in divideAndRemainder
  • Fix for #237, when precision and exponent are same invalid value was returned
  • Fix for #231, exception incorrectly thrown when using scale (the library was only checking for unlimited precision instead of that and presence of scale)

Bugfixes, kotlin update

22 May 13:37
Compare
Choose a tag to compare
  • Provide big integer/big decimal to their java counterpart conversion methods. They are slow as they rely on string conversion. #230
  • Update to Kotlin 1.6.21
  • Fix for #229, incorrect doubleValue result when exact result is not required and significand is larger than Long.MAX_VALUE

Bugfixes, api change

15 Jan 20:01
Compare
Choose a tag to compare
  • Throw a specific exception when exponentiation of zero with negative exponent is attempted (#206)
  • Remove zero counting debug log (#210)
  • Fix for invalid decimal precision when dividend has exponent -1 (#195)
  • API CHANGE Narrowing function (longValue, intValue, doubleValue...) are now defaulting to exactRequired which means they
    will throw ArithmeticException if the conversion cannot be done without loss.
  • Use temporary javascript comparison workaround to handle precision loss. This is fixed in kotlin 1.6.20 and the workaround will be removed once that is released.

0.3.3

09 Nov 11:54
Compare
Choose a tag to compare
  • Add support for apple silicon (#188 #194)

Kotlinx serialization support library, dependency verification and bugfixes

05 Sep 20:26
Compare
Choose a tag to compare
  • Added kotlinx serialization support library
  • Enabled gradle dependencies verification (bootstrapped)
  • Fix for losing decimal mode when using unary minus (#184)
  • Fix for losing sign when narrowing to long from big integer (#186)

Build base on 1.5.0 and bugfix

10 May 21:31
Compare
Choose a tag to compare
  • Fix for #176, a case of unclear API. Methods roundToDigitPositionAfterDecimalPoint and roundToDigitPosition would set decimal precision to the number of digits present in the result after the rounding was completed. Now they only set decimal precision if it's explicitly set, otherwise it stays unlimited.
  • Bump to Kotlin 1.5.0
  • Including Kotlin 1.4.32 release to support projects using that Kotlin version and unsigned integers.

BigDecimal API changes and bugfixes

17 Apr 10:41
Compare
Choose a tag to compare
  • Fixed losing scale when there is a carry in addition in BigDecimal.
  • Fixed BigInteger numberOfDecimalDigits which would return 0 for 0 instead of 1.
  • Fixed #168 - Fix invalid rounding results Development roadmap for version 0.3.0 states 'API statbilization' so:
  • API CHANGE Extensions functions used to create BigDecimal from primitive types have been split into 'toBigDecimal(exponentModifier...)' and 'toBigDecimalUsingSignificandAndExponent(exponent...)' to bring more clarity to the API and solve #164
  • API CHANGE BigInteger uses a sum of magnitude elements as part of hash code instead of array hash code as it wasn't stable on JS
  • API CHANGE BigDecimal hashCode doesn't include decimal mode anymore, so it respects contract that hash code equals another hash code when equals returns true.
  • API CHANGE BigDecimal equals doesn't consider decimal mode anymore. Two big decimals are now equal only if they represent the same number.
  • Fixed decimal mode precision/scale mismatch in BigDecimal #161
    • NOTE: API CHANGE final precision is now desiredPrecision + scale
  • Add @SharedImmutable to BigInteger to support native multithreading #159

Bugfixes

15 Feb 09:53
078a003
Compare
Choose a tag to compare
  • Fixed support for watchosX64/watchos86 (#150)
  • Fixed parsing characters outside of radix range (#152)
  • Fixed invalid byte array intialization (#153)
  • Fixed rounding KDoc (#156)