Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: elsie!ado@ncifcrf.gov (Arthur David Olson) Newsgroups: comp.sys.sun Subject: SunOS 4.0.3's printf and -0 Message-ID: <1104@brazos.Rice.edu> Date: 19 Aug 89 20:52:24 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 30 Keywords: SunOS Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 107, message 11 of 16 An interesting result from SunOS 4.0.3's printf (with a tip of the hat to IEEE): Script started on Sat Aug 19 15:40:36 1989 elsie$ cat try.c #include main() { float f, g, h, i; f = -1; g = 0; h = f * g; i = h; (void) printf("%g %g\n", h, i); if (i == 0) i = 0; (void) printf("%g %g\n", h, i); return 0; } elsie$ cc try.c elsie$ a.out -0 -0 -0 0 elsie$ exit script done on Sat Aug 19 15:40:52 1989 -- Arthur David Olson ado@alw.nih.gov ADO is a trademark of Ampex.