bug fix in rounding for 4-byte floating point numbers
authorceriel <none@none>
Wed, 11 Oct 1989 13:34:05 +0000 (13:34 +0000)
committerceriel <none@none>
Wed, 11 Oct 1989 13:34:05 +0000 (13:34 +0000)
mach/con_float

index a86701c..5424a86 100644 (file)
@@ -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++;