kotlin-multiplatform-bignum v0.2.0 Release Notes

Release Date: 2020-08-18 // over 3 years ago
    • ๐Ÿ‘Œ Improvement #122 Add "scale" support to BigDecimal
    • ๐Ÿ›  Fixed #118 Rounding issue on division
    • ๐Ÿ‘Œ Improvement #116 Introduce local gradle varibale to enable JVM target on different platforms
    • ๐Ÿ›  Fixed #112 BigDecimal divideAndRemainder bad result
    • ๐Ÿ›  Fixed #111 - BigDecimal narrowing
    • ๐Ÿ›  Fixed #104 - BigInteger.toByteArray should prefer ByteArray over Array
    • ๐Ÿ›  Fixed #103 - Removed coroutines
    • ๐Ÿ›  Fixed #90 - Incorrect Result From Negative Double
    • ๐Ÿ›  Fixed #88 - BigInteger.bitAt does not work correctly
    • ๐Ÿ›  Fixed #86 - Rounding fails when integer part is 9
    • ๐Ÿ›  Fixed #88 - BigInteger.bitAt() returns invalid value
    • Built with Kotlin 1.4.0
    • Reworked to(U)ByteArray conversion methods
      • from and to conversions were not consistent, from(U)ByteArray expected a string of bytes ordered in little or big endian,
        while to(U)ByteArray produced Int or Long represented as byte with little endian or big endian order.
      • Replaced with a consistent to and from byte/ubyte array conversions
      • fromUByteArray always expects a big-endian ordered array of unsigned bytes
      • fromByteArray always expects a big-endian ordered array of bytes
      • toUByteArray produces unsigned byte array in big-endian order
      • toByteArray produces signed byte array in big-endian order
      • There are two helper methods that convert to and from a two's complement ByteArray, this form conforms to Java BigIntegers toByteArray
      • fromTwosComplementByteArray expects a two's complement ByteArray with at least one sign bit
      • toTwosComplementByteArrayproduces a two's complement ByteArray with at least one sign bit
    • โž• Added secureOverwrite to BigNumber interface, with role of overwriting backing structures with zeroes. It's meant to
      be used by libraries that require such a functionlity (i.e. crypto). The function also breaks immutability contract
      of BigNumber implementations, and further operations with that instances have undefined results.