Package-level declarations

Types

Link copied to clipboard
data class ConfidenceInterval(val lower: Double, val upper: Double)

A confidence interval with a lower and upper bound.

Properties

Link copied to clipboard
const val EULER_MASCHERONI: Double = 0.5772156649015329

The Euler-Mascheroni constant, approximately 0.5772.

Functions

Link copied to clipboard
fun beta(a: Double, b: Double): Double

Computes the beta function for parameters a and b.

Link copied to clipboard

Computes the digamma (psi) function at x.

Link copied to clipboard
fun erf(x: Double): Double

Computes the error function at x.

Link copied to clipboard
fun erfc(x: Double): Double

Computes the complementary error function at x, equal to 1 - erf(x).

Link copied to clipboard

Computes the inverse complementary error function at y.

Link copied to clipboard

Computes the inverse error function at x.

Link copied to clipboard
fun findQuantile(p: Double, cdf: (Double) -> Double, pdf: (Double) -> Double, initialGuess: Double, lowerBound: Double = Double.NEGATIVE_INFINITY, upperBound: Double = Double.POSITIVE_INFINITY): Double

Finds the quantile value x such that cdf(x) = p, using Newton-Raphson with bisection fallback.

Link copied to clipboard

Computes the gamma function at x.

Link copied to clipboard
fun gcd(a: Long, b: Long): Long

Computes the greatest common divisor of two integers using the Euclidean algorithm.

Link copied to clipboard

Computes the generalized harmonic number H(n, s) = Σ_{i=1}^{n} 1/i^s.

Link copied to clipboard
fun lcm(a: Long, b: Long): Long

Computes the least common multiple of two integers.

Link copied to clipboard
fun lnBeta(a: Double, b: Double): Double

Computes the natural logarithm of the beta function for parameters a and b.

Link copied to clipboard

Computes the natural logarithm of the binomial coefficient "n choose k".

Link copied to clipboard

Computes the natural logarithm of n factorial.

Link copied to clipboard

Computes the natural logarithm of the gamma function at x.

Link copied to clipboard

Computes the natural logarithm of the number of k-permutations of n items.

Link copied to clipboard

Computes the regularized incomplete beta function I(x; a, b) at point x.

Link copied to clipboard

Computes the lower regularized incomplete gamma function P(a, x).

Link copied to clipboard

Computes the upper regularized incomplete gamma function Q(a, x), the complement of regularizedGammaP.

Link copied to clipboard
actual fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

actual fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

actual fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

expect fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

actual fun secureRandom(): Random

Returns a cryptographically secure random number generator backed by the Web Crypto API.

actual fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

actual fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

actual fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

actual fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

actual fun secureRandom(): Random

Returns a cryptographically secure random number generator for the current platform.

Link copied to clipboard

Computes the trigamma function at x.