home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!gumby!destroyer!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!vega!ntomczak
- From: ntomczak@vega.math.ualberta.ca (N Tomczak-Jaegermann)
- Subject: Re: printf g format still broken under NeXTSTEP 3.0
- Message-ID: <ntomczak.721544682@vega>
- Sender: news@kakwa.ucs.ualberta.ca
- Nntp-Posting-Host: vega.math.ualberta.ca
- Organization: University Of Alberta, Edmonton Canada
- References: <1992Nov11.012228.23372@access.usask.ca> <1992Nov11.095957.22979@cs.brown.edu>
- Date: Thu, 12 Nov 1992 05:04:42 GMT
- Lines: 35
-
- rca@cs.brown.edu (Ronald C. Antony) writes:
-
- >Well, not to protect NeXT in regards to sleeping over important bug
- >reports (sometimes I also wonder how they set the priorities, altough
- >certainly nobody could claim they are otherwise lazy), I still wonder
- >if they are not right. Maybe there are just two opinions what ANSI-C
- >is supposed to do.
-
- >The C-Bible "The C Programming Language" by K+R, 2nd edition, ANSI-C
- >states the following on page 244:
-
- >g,G double; %e or %E is used if the exponent is less than -4 or
- > greater than or equal to the precision; otherwise %f is used.
- > Trailing zeros and a trailing decimal point are not printed.
-
-
- >Now if they got it right, NeXT got it right. If K+R got it wrong,
- >well, then NeXT should correct the bug and tell Prentice Hall to
- >correct their bug as well.
-
- Well, you cannot have two ways of defining standard and The Standard
- says explicitely about g, G conversions "... the precision specyfying
- the number of significant digits". K&R/2 chopped 7 lines of a
- description from The Standard into 3 lines dropping an essential
- piece of an information in the process.
-
- What is more I know of many computers around which got it right.
- Look for example at gawk sources and find out how many of them
- need -DGFMT_WORKAROUND to alleviate problems of buggy libraries.
- Library correctness does not seem to be very high on NeXT list.
- BTW - I was also reporting this problem in early days of 2.1.
- Everybody can see results. :-)
-
- Michal Jaegermann
- ntomczak@vega.math.ualberta.ca
-