Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!necntc!cullvax!drw From: drw@cullvax.UUCP (Dale Worley) Newsgroups: comp.unix.wizards,comp.lang.c Subject: Incorrect subtraction in C program Message-ID: <1242@cullvax.UUCP> Date: Wed, 3-Jun-87 18:07:42 EDT Article-I.D.: cullvax.1242 Posted: Wed Jun 3 18:07:42 1987 Date-Received: Sun, 7-Jun-87 04:02:12 EDT Organization: Cullinet Software, Westwood, MA, USA Lines: 20 Xref: mnetor comp.unix.wizards:2591 comp.lang.c:2334 jwp@uwmacc.UUCP (Jeffrey W Percival) writes: > I have a problem I have distilled down into a short C program. > 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: This may have to do with the fact that the code in BSD that simulates the VAX instructions that the uVAX hardware doesn't have has problems with it. If you have VMS on a uVAX also, use the debuggers to see if the floating subtract instructions produce different results on the two OS's from the same arguments. (There's someone out in netland who knows more about this.) Dale -- Dale Worley Cullinet Software UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw ARPA: cullvax!drw@eddie.mit.edu Un*x (a generic name for a class of OS's) != Unix (AT&T's brand of such)