瀏覽代碼

bug fix in rounding for 4-byte floating point numbers

ceriel 35 年之前
父節點
當前提交
ebcd62f7d2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mach/con_float

+ 1 - 1
mach/con_float

@@ -77,7 +77,7 @@ float_cst(str, sz, buf)
 		e.flt_exp += 127;
 		if (e.flt_mantissa.flt_h_32 == 0) e.flt_exp = 0;
 #ifdef IEEEFLOAT
-		if (e.flt_mantissa.flt_l_32 & 0x80) {
+		if (e.flt_mantissa.flt_h_32 & 0x80) {
 			/* rounding */
 			if ((e.flt_mantissa.flt_h_32 & 0xffffff00) == 0xffffff00) {
 				e.flt_exp++;