sqrt

fun sqrt(value: KBigDecimal, scale: Int = 10): KBigDecimal

Calculates the square root of a KBigDecimal using Newton's method for iterative approximation.

Return

The square root of the input value with the specified precision

Parameters

value

The KBigDecimal to calculate the square root of

scale

The number of decimal places in the result (default: 10)

Throws

if the value is negative