Skip to content

Commit

Permalink
Bump to 0.3.7-SNAPSHOT. Fix 231.
Browse files Browse the repository at this point in the history
  • Loading branch information
ionspin committed May 22, 2022
1 parent 3aa4f52 commit 9175878
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
16 changes: 12 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
## Descriptive changelog
(All dates are DD.MM.YYYY)

##### 0.3.4-SNAPSHOT - current main
##### 0.3.7-SNAPSHOT - current snapshot
- Fix for #231, exception incorrectly thrown when using scale (the library was only checking for unlimited precision instead of that and presence of scale)

##### 0.3.6 - 22.5.2022
- 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 toDouble result when exact result is not required and significand was larger than Long.MAX_VALUE


##### 0.3.4-SNAPSHOT - 15.1.2022
- 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.
- 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
- Use temporary javascript comparison workaround to handle precision loss.


##### 0.3.3 - 9.11.2021
- Add support for apple silicon (#188 #194)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ and bug-fixing.

#### Gradle
```kotlin
implementation("com.ionspin.kotlin:bignum:0.3.4")
implementation("com.ionspin.kotlin:bignum:0.3.6")
```

#### Snapshot builds
Expand All @@ -37,7 +37,7 @@ repositories {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}
}
implementation("com.ionspin.kotlin:bignum:0.3.5-SNAPSHOT")
implementation("com.ionspin.kotlin:bignum:0.3.7-SNAPSHOT")

```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ class BigDecimal private constructor(
*/
fun divide(other: BigDecimal, decimalMode: DecimalMode? = null): BigDecimal {
val resolvedDecimalMode = resolveDecimalMode(this.decimalMode, other.decimalMode, decimalMode)
if (resolvedDecimalMode.isPrecisionUnlimited) {
if (resolvedDecimalMode.isPrecisionUnlimited && resolvedDecimalMode.usingScale.not()) {
val newExponent = this.exponent - other.exponent
val power = (other.precision * 2 + 6)
val thisPrepared = this.significand * BigInteger.TEN.pow(power)
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Deps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object Versions {
val dokkaPlugin = "1.6.10"
}

val projectVersion = "0.3.5-SNAPSHOT"
val projectVersion = "0.3.7-SNAPSHOT"

object Deps {

Expand Down

0 comments on commit 9175878

Please sign in to comment.