Skip to content

Commit 5d5179b

Browse files
author
Zachary Scott
committed
Revert "temp workaround BigDecimal division issue [Bug ruby#9316]"
This reverts commit 1e778b3. Please see ruby/ruby@e7fe564 for the official patch
1 parent a8d112b commit 5d5179b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

ext/bigdecimal/bigdecimal.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,6 @@ BigDecimal_divide(Real **c, Real **res, Real **div, VALUE self, VALUE r)
12221222
*div = b;
12231223
mx = a->Prec + vabs(a->exponent);
12241224
if (mx<b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
1225-
if (mx<3) mx = 3;
12261225
mx =(mx + 1) * VpBaseFig();
12271226
GUARD_OBJ((*c), VpCreateRbObject(mx, "#0"));
12281227
GUARD_OBJ((*res), VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
@@ -1324,7 +1323,6 @@ BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
13241323

13251324
mx = a->Prec + vabs(a->exponent);
13261325
if (mx<b->Prec + vabs(b->exponent)) mx = b->Prec + vabs(b->exponent);
1327-
if (mx<3) mx = 3;
13281326
mx = (mx + 1) * VpBaseFig();
13291327
GUARD_OBJ(c, VpCreateRbObject(mx, "0"));
13301328
GUARD_OBJ(res, VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));

0 commit comments

Comments
 (0)