kotlin-multiplatform-bignum v0.3.0 Release Notes

    • ๐Ÿ›  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