also you can really easily define extension properties to convert number types or strings to
BigDecimal
Copy code
val Number.BD: BigDecimal get() = BigDecimal(this.toDouble())
val String.BD: BigDecimal get() = BigDecimal(this)
fun main(args: Array<String>) {
val bd1 = 1.BD
val bd2 = "3.14".BD
}