You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import org.gciatto.kt.math.BigInteger
fun main() {
BigInteger.of(5).divideAndRemainder(2)
}
Result:
Exception in thread "main" java.lang.ClassCastException: class org.gciatto.kt.math.JavaBigIntegerAdapter cannot be cast to class java.math.BigInteger (org.gciatto.kt.math.JavaBigIntegerAdapter is in unnamed module of loader 'app'; java.math.BigInteger is in module java.base of loader 'bootstrap')
at org.gciatto.kt.math.JavaBigIntegerAdapter.divideAndRemainder(JavaBigIntegerAdapter.kt:186)
at org.gciatto.kt.math.BigInteger$DefaultImpls.divideAndRemainder(BigInteger.kt:157)
at org.gciatto.kt.math.JavaBigIntegerAdapter.divideAndRemainder(JavaBigIntegerAdapter.kt:5)
at BigIntegerTestKt.main(BigIntegerTest.kt:4)
at BigIntegerTestKt.main(BigIntegerTest.kt)
The text was updated successfully, but these errors were encountered:
Test program:
Result:
The text was updated successfully, but these errors were encountered: