From 7977255699144fcb200bfc2d15f4546a9184e98f Mon Sep 17 00:00:00 2001 From: pessimist Date: Fri, 28 Feb 2025 18:08:39 +0300 Subject: [PATCH 1/2] Update functions.md added the case if exponent is 0, the result is definitely 1 --- reference/functions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/reference/functions.md b/reference/functions.md index d8c506d7c9..57d64aa796 100644 --- a/reference/functions.md +++ b/reference/functions.md @@ -2172,6 +2172,7 @@ Returns the result of raising `i1` to the power of `i2`. In the event of an _ove * if `i1` is `1`, return `1` * if `i1` is `0`, return `0` * if `i2` is `1`, return `i1` +* if `i2` is `0`, return `1` * if `i2` is negative or greater than `u32::MAX`, throw a runtime error **example:** From 621d7357b9d1f0edaa50f52b59d13c02cf97f6dd Mon Sep 17 00:00:00 2001 From: wileyj <2847772+wileyj@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:49:10 -0700 Subject: [PATCH 2/2] stacks-core #5923 --- reference/functions.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/reference/functions.md b/reference/functions.md index 57d64aa796..f92d3b95c5 100644 --- a/reference/functions.md +++ b/reference/functions.md @@ -2171,8 +2171,6 @@ Returns the result of raising `i1` to the power of `i2`. In the event of an _ove * if both `i1` and `i2` are `0`, return `1` * if `i1` is `1`, return `1` * if `i1` is `0`, return `0` -* if `i2` is `1`, return `i1` -* if `i2` is `0`, return `1` * if `i2` is negative or greater than `u32::MAX`, throw a runtime error **example:**