commonMain.com.soywiz.kbignum.BigExt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kbignum-tvossimulatorarm64 Show documentation
Show all versions of kbignum-tvossimulatorarm64 Show documentation
Big Integers and decimals in Kotlin Common
package com.soywiz.kbignum
// Big Integer
val Long.bi get() = BigInt(this)
val Int.bi get() = BigInt(this)
val String.bi get() = BigInt(this)
fun String.bi(radix: Int) = BigInt(this, radix)
// Big Number
val Double.bn get() = BigNum("$this")
val Long.bn get() = BigNum(this.bi, 0)
val Int.bn get() = BigNum(this.bi, 0)
val String.bn get() = BigNum(this)