ObserverOfTime / kbigint

Kotlin Multiplatform BigInteger library

Home Page:https://observeroftime.github.io/kbigint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KBigInt

Kotlin Multiplatform BigInteger library.

Platforms

Platform Implementation
JVM BigInteger
Android BigInteger
JS BigInt*
Native LibTomMath
WASM Not implemented

* Kotlin/JS does not fully support BigInt (KT-48980).

Motivation

Kotlin does not support BigInteger and BigDecimal types in multiplatform projects (KT-20912).
However, I was not interested in BigDecimal so this library only implements BigInteger.
Serialization is implemented in a separate module so the main library can be used on its own.

Alternatives

  • Fully custom implementation.
  • Internal library.
  • No serialization.
  • Custom Native implementation.
  • Internal library.
  • No serialization.
  • Depends on Apache Commons Math in JVM.
  • Only Linux is supported in Native (using gmp).
  • No longer updated.
  • No serialization.
  • Stub JS implementation.
  • No Native implementation.

License

Apache License 2.0

About

Kotlin Multiplatform BigInteger library

https://observeroftime.github.io/kbigint/

License:Apache License 2.0


Languages

Language:Kotlin 92.4%Language:JavaScript 7.6%