home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / next / programm / 7179 < prev    next >
Encoding:
Text File  |  1992-11-12  |  2.1 KB  |  48 lines

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