Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mimsy!chris From: chris@mimsy.UUCP Newsgroups: comp.unix.wizards,comp.lang.c Subject: Re: Incorrect subtraction in C program Message-ID: <6879@mimsy.UUCP> Date: Tue, 2-Jun-87 02:29:51 EDT Article-I.D.: mimsy.6879 Posted: Tue Jun 2 02:29:51 1987 Date-Received: Thu, 4-Jun-87 01:20:49 EDT References: <1573@uwmacc.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 17 Keywords: vax, C, 4.3BSD Xref: utgpu comp.unix.wizards:2342 comp.lang.c:2199 Summary: emulate.s bug In article <1573@uwmacc.UUCP> jwp@uwmacc.UUCP (Jeffrey W Percival) writes: >The problem is that when I subtract a tiny number from 1, >I get 1 (the right answer) on a VAX 780 running 4.3BSD, but >I get 0 (the wrong answer) on a MicroVAX running 4.3BSD. Here's >the program: [the important line:] > fprintf(stdout, "a=%f, b=%f, c=%f, d=%f, e=%f\n", a, b, c, d, e); There is a bug in the emulation code in /sys/vax/emulate.s. Try main(){printf("%.0f\n", 0.9);exit(0);} I have not seen a fix on comp.bugs.4bsd.ucb-fixes. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: seismo!mimsy!chris