* 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
@ -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>
|
Tue Mar 16 17:18:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* include/ruby/encoding.h (rb_str_conv_enc_opts): missing prototype.
|
* 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';
|
e = e * 10 + exp_chr[i] - '0';
|
||||||
if(es>e*((S_INT)BASE_FIG)) {
|
if(es>e*((S_INT)BASE_FIG)) {
|
||||||
exponent_overflow = 1;
|
exponent_overflow = 1;
|
||||||
|
e = es;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++i;
|
++i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user