BigDecimal

expect class BigDecimal(value: String) : Number, Comparable<BigDecimal>

A floating point decimal number with arbitrary precision.

Parameters

value

the String representation of this decimal number

actual class BigDecimal(val value: String) : Number, Comparable<BigDecimal>

Constructors

Link copied to clipboard
expect constructor(mantissa: BigInteger, exponent: Int)

Create an instance of BigDecimal from a mantissa and exponent.

expect constructor(value: String)
actual constructor(mantissa: BigInteger, exponent: Int)
actual constructor(value: String)

Properties

Link copied to clipboard
expect val exponent: Int

The exponent of this decimal number. If zero or positive, this represents the number of digits to the right of the decimal point. If negative, the mantissa is multiplied by ten to the power of the negation of the scale.

actual val exponent: Int
Link copied to clipboard
expect val mantissa: BigInteger

The mantissa of this decimal number

actual val mantissa: BigInteger
Link copied to clipboard

Functions

Link copied to clipboard
expect open operator override fun compareTo(other: BigDecimal): Int
actual open operator override fun compareTo(other: BigDecimal): Int
Link copied to clipboard
expect open operator override fun equals(other: Any?): Boolean
actual open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
expect open override fun toByte(): Byte
actual open override fun toByte(): Byte
Link copied to clipboard
expect open override fun toDouble(): Double
actual open override fun toDouble(): Double
Link copied to clipboard
expect open override fun toFloat(): Float
actual open override fun toFloat(): Float
Link copied to clipboard
expect open override fun toInt(): Int
actual open override fun toInt(): Int
Link copied to clipboard
expect open override fun toLong(): Long
actual open override fun toLong(): Long
Link copied to clipboard
expect fun toPlainString(): String
actual fun toPlainString(): String
Link copied to clipboard
expect open override fun toShort(): Short
actual open override fun toShort(): Short

Inherited functions

toChar
Link copied to clipboard
open fun toChar(): Char
open fun toChar(): Char