summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 20d3856508..386378dcd5 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3988,6 +3988,7 @@ int_pow(long x, unsigned long y)
long z = 1;
if (y == 0) return INT2FIX(1);
+ if (y == 1) return LONG2NUM(x);
if (neg) x = -x;
if (y & 1)
z = x;