summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 6734c836f1..7402f1527c 100644
--- a/numeric.c
+++ b/numeric.c
@@ -2209,7 +2209,7 @@ int_pow(x, y)
z = xz;
}
} while (--y);
- if (neg) z = -z;
+ if (neg && (y & 1)) z = -z;
return LONG2NUM(z);
}