mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/bigdecimal/bigdecimal.c (VpCtoV): keep e's sign.
When e doesn't over flow e * BASE_FIG but overflow e * 10, e will overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
43025927c6
commit
d4120b1f1d
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Mar 16 17:33:30 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (VpCtoV): keep e's sign.
|
||||
When e doesn't over flow e * BASE_FIG but overflow e * 10,
|
||||
e will overflow.
|
||||
|
||||
Tue Mar 16 17:18:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/encoding.h (rb_str_conv_enc_opts): missing prototype.
|
||||
|
|
|
@ -4045,6 +4045,7 @@ VpCtoV(Real *a, const char *int_chr, U_LONG ni, const char *frac, U_LONG nf, con
|
|||
e = e * 10 + exp_chr[i] - '0';
|
||||
if(es>e*((S_INT)BASE_FIG)) {
|
||||
exponent_overflow = 1;
|
||||
e = es;
|
||||
break;
|
||||
}
|
||||
++i;
|
||||
|
|
Loading…
Add table
Reference in a new issue