提交 9e5180cd 编写于 作者: M Michiharu Ariza

more double changes

上级 9af33d7a
......@@ -229,10 +229,10 @@ struct Number
{
return (int32_t)(value * 65536.0);
}
inline void set_real (float v) { value = (double)v; }
inline float to_real (void) const
inline void set_real (double v) { value = (double)v; }
inline double to_real (void) const
{
return (float)value;
return value;
}
inline int ceil (void) const
......@@ -520,7 +520,7 @@ struct ArgStack : Stack<ARG, 513>
n.set_fixed (v);
}
inline void push_real (float v)
inline void push_real (double v)
{
ARG &n = S::push ();
n.set_real (v);
......
......@@ -103,9 +103,9 @@ struct DictOpSet : OpSet<Number>
}
}
static inline float parse_bcd (SubByteStr& substr)
static inline double parse_bcd (SubByteStr& substr)
{
float v = 0.0f;
double v = 0.0;
bool neg = false;
double int_part = 0;
......@@ -126,7 +126,7 @@ struct DictOpSet : OpSet<Number>
if (!substr.avail ())
{
substr.set_error ();
return 0.0f;
return 0.0;
}
byte = substr[0];
substr.inc ();
......@@ -152,13 +152,13 @@ struct DictOpSet : OpSet<Number>
else
value *= pow (10.0, (double)exp_part);
}
return (float)value;
return value;
case NEG:
if (i != 0)
{
substr.set_error ();
return 0.0f;
return 0.0;
}
neg = true;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册