With the java BigDecimal library, there is a supporting library called BigDecimalMath: https://github.com/eobermuhlner/big-math
This includes lots of extra functions for working with BigDecimals, such as:
log(BigDecimal, MathContext)
exp(BigDecimal, MathContext)
pow(BigDecimal, BigDecimal, MathContext) // calculates x^y
sqrt(BigDecimal, MathContext)
root(BigDecimal, BigDecimal, MathContext) // calculates the n'th root of x
sin(BigDecimal, MathContext)
sinh(BigDecimal, MathContext)
factorial(int)
It would be really nice to see these functions available in Kotlin Native to allow comprehensive arbitrary precision mathematics.
With the java BigDecimal library, there is a supporting library called BigDecimalMath: https://github.com/eobermuhlner/big-math
This includes lots of extra functions for working with BigDecimals, such as:
It would be really nice to see these functions available in Kotlin Native to allow comprehensive arbitrary precision mathematics.