提交 a5fa843c 编写于 作者: M Michiharu Ariza

fixed a bug with fractional part in a negative value

上级 620d1ef5
...@@ -146,7 +146,11 @@ struct DictOpSet : OpSet<Number> ...@@ -146,7 +146,11 @@ struct DictOpSet : OpSet<Number>
case END: case END:
value = (double)(neg? -int_part: int_part); value = (double)(neg? -int_part: int_part);
if (frac_count > 0) if (frac_count > 0)
value += (frac_part / pow (10.0, (double)frac_count)); {
double frac = (frac_part / pow (10.0, (double)frac_count));
if (neg) frac = -frac;
value += frac;
}
if (unlikely (exp_overflow)) if (unlikely (exp_overflow))
{ {
if (value == 0.0) if (value == 0.0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册