diff --git a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/OptionalOperations.kt b/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/OptionalOperations.kt index 21a263ebd..5b44fe964 100644 --- a/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/OptionalOperations.kt +++ b/kmath-core/src/commonMain/kotlin/scientifik/kmath/operations/OptionalOperations.kt @@ -87,16 +87,16 @@ interface RemainderDivisionOperations : RingOperations { /** * Calculates the remainder of dividing this value by [arg]. */ - infix fun T.rem(arg: T): T + operator fun T.rem(arg: T): T /** * Performs the floored division of this value by [arg]. */ - infix fun T.div(arg: T): T + operator fun T.div(arg: T): T override fun binaryOperation(operation: String, left: T, right: T): T = when (operation) { - REM_OPERATION -> left rem right - DIV_OPERATION -> left div right + REM_OPERATION -> left % right + DIV_OPERATION -> left / right else -> super.binaryOperation(operation, left, right) } diff --git a/kmath-core/src/jvmMain/kotlin/scientifik/kmath/operations/BigNumbers.kt b/kmath-core/src/jvmMain/kotlin/scientifik/kmath/operations/BigNumbers.kt index a0c9c9202..71fcc4518 100644 --- a/kmath-core/src/jvmMain/kotlin/scientifik/kmath/operations/BigNumbers.kt +++ b/kmath-core/src/jvmMain/kotlin/scientifik/kmath/operations/BigNumbers.kt @@ -14,14 +14,15 @@ object JBigIntegerField : Ring, RemainderDivisionOperations