diff options
Diffstat (limited to 'ext/bigdecimal/bigdecimal.c')
-rw-r--r-- | ext/bigdecimal/bigdecimal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index af1d5246f5..88f56176b7 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -2381,6 +2381,9 @@ retry: GUARD_OBJ(y, VpCreateRbObject(1, "0")); } VpPower(y, x, int_exp); + if (VpIsDef(y)) { + VpMidRound(y, VpGetRoundMode(), n); + } return ToValue(y); } |