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 producedInt
orLong
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 bytesfromByteArray
always expects a big-endian ordered array of bytestoUByteArray
produces unsigned byte array in big-endian ordertoByteArray
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 bittoTwosComplementByteArray
produces a two's complement ByteArray with at least one sign bit
- from and to conversions were not consistent, from(U)ByteArray expected a string of bytes ordered in little or big endian,
- โ 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.