From 79736a0a9b6450df9ae0a7d7209b8aa7603d36c4 Mon Sep 17 00:00:00 2001 From: Gleb Minaev <43728100+lounres@users.noreply.github.com> Date: Tue, 15 Mar 2022 15:36:10 +0300 Subject: [PATCH] Forgot to remove unnecessary `tailrec` --- .../kotlin/space/kscience/kmath/functions/algebraicStub.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmath-functions/src/commonMain/kotlin/space/kscience/kmath/functions/algebraicStub.kt b/kmath-functions/src/commonMain/kotlin/space/kscience/kmath/functions/algebraicStub.kt index 3c37a01ec..537184ba3 100644 --- a/kmath-functions/src/commonMain/kotlin/space/kscience/kmath/functions/algebraicStub.kt +++ b/kmath-functions/src/commonMain/kotlin/space/kscience/kmath/functions/algebraicStub.kt @@ -33,7 +33,7 @@ internal fun Group.optimizedMultiply(arg: C, other: Int): C = * @return sum of the augend [base] and product of the multiplicand [arg] and the multiplier [multiplier]. * @author Gleb Minaev */ -internal tailrec fun Group.optimizedAddMultiplied(base: C, arg: C, multiplier: Int): C = +internal fun Group.optimizedAddMultiplied(base: C, arg: C, multiplier: Int): C = if (multiplier >= 0) optimizedAddMultiplied(base, arg, multiplier.toUInt()) else optimizedAddMultiplied(base, arg, (-multiplier).toUInt())