1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Precision for '**' enhanced (bug).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shigek 2003-07-01 14:14:18 +00:00
parent e8aa990f92
commit 49298086d0

View file

@ -3891,7 +3891,7 @@ VpPower(Real *y, Real *x, S_INT n)
/* Allocate working variables */ /* Allocate working variables */
w1 = VpAlloc((x->Prec + 2) * BASE_FIG, "#0"); w1 = VpAlloc((y->MaxPrec + 2) * BASE_FIG, "#0");
w2 = VpAlloc((w1->MaxPrec * 2 + 1) * BASE_FIG, "#0"); w2 = VpAlloc((w1->MaxPrec * 2 + 1) * BASE_FIG, "#0");
/* calculation start */ /* calculation start */
@ -3900,7 +3900,7 @@ VpPower(Real *y, Real *x, S_INT n)
while(n > 0) { while(n > 0) {
VpAsgn(w1, x, 1); VpAsgn(w1, x, 1);
s = 1; s = 1;
loop1: ss = s; loop1: ss = s;
s += s; s += s;
if(s >(U_LONG) n) goto out_loop1; if(s >(U_LONG) n) goto out_loop1;
VpMult(w2, w1, w1); VpMult(w2, w1, w1);