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

Bug in '/' fixed by Tadashi Saito.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shigek 2003-06-29 13:20:08 +00:00
parent d5f31755fc
commit a40a92f04c

View file

@ -683,8 +683,10 @@ BigDecimal_div(VALUE self, VALUE r)
/* c xxxxx
r 00000yyyyy ==> (y/b)*BASE >= HALF_BASE
*/
/* Round up ? */
VpInternalRound(c,0,c->frac[c->Prec-1],(VpBaseVal()*res->frac[0])/div->frac[0]);
/* Round */
if(VpIsDef(c)) {
VpInternalRound(c,0,c->frac[c->Prec-1],(VpBaseVal()*res->frac[0])/div->frac[0]);
}
return ToValue(c);
}