Constants
Overview
Multik does not define its own mathematical constants. Use the constants from Kotlin's standard library kotlin.math:
Constant | Value | Type |
|---|---|---|
| 3.141592653589793 |
|
| 2.718281828459045 |
|
Usage with NDArrays
import kotlin.math.PI
import kotlin.math.E
val angles = mk.linspace<Double>(0, 1, 100) * PI // 0 to PI
val exponential = mk.d1array(5) { E.pow(it.toDouble()) }
Special values
ComplexFloat and ComplexDouble define these constants:
Constant | Type | Value |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 February 2026