Is there a class similar to BigInteger for Java in Kotlin to hold very large numbers? Eg: 100 Digits
Asked
Active
Viewed 188 times
0
-
1Does this answer your question? [BigInteger in Kotlin](https://stackoverflow.com/questions/44287466/biginteger-in-kotlin) – Robin Nov 08 '22 at 10:26
-
1No! I wanna know if there is a equivalent for BigInteger natively in kotlin instead of mixing java classes – Arun Joseph Nov 08 '22 at 10:39
1 Answers
2
There is currently no such class in the official Kotlin standard library other than Java's BigInteger. You might be able to use third-party libraries such as kotlin-multiplatform-bignum or kt-math, as long as you're ok with their licence conditions and be aware that both of them may change in future, and that neither of them is likely to be as fast as Java's BigInteger.

k314159
- 5,051
- 10
- 32