home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18664 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.7 KB

  1. Xref: sparky comp.lang.c:18664 gnu.gcc.help:2774
  2. Newsgroups: comp.lang.c,gnu.gcc.help
  3. Path: sparky!uunet!van-bc!inde!newshost!gday
  4. From: gday@ignatz.inde.bc.ca (Gordon Day)
  5. Subject: Re: How precise is preprocessor math? (I'm using gcc)
  6. In-Reply-To: tom@flood.com's message of 18 Dec 92 10:49:56 GMT
  7. Message-ID: <GDAY.92Dec18164110@ignatz.inde.bc.ca>
  8. Sender: news@inde.bc.ca
  9. Organization: INDE Electronics, Inc.
  10. References: <EJH.92Dec15111402@khonshu.colorado.edu> <1992Dec16.185400.20204@crd.ge.com>
  11.     <1992Dec18.104956.11433@flood.com>
  12. Date: Sat, 19 Dec 1992 00:41:10 GMT
  13. Lines: 22
  14.  
  15. >>>"tc" == Tom Chatt <tom@flood.com> writes:
  16.  
  17. tc> If Chris Volpe was suggesting the more limited proposition that
  18. tc> certain standard calls, such as sin(), are "known" to the
  19. tc> compiler, that's plausible, but still seems dubious. "sin" is not
  20. tc> a resrved word in C, and nothing would prevent me from writing my
  21. tc> own "sin()" routine which did something completely different. Even
  22. tc> if all of the standards committees agreed that no one shall write
  23. tc> routines called "sin" which do anything other than perform the
  24. tc> math sine function, there would still be different
  25. tc> implementations, and a compiler would be presumptuous to pick one
  26. tc> for me. I concede that there is a somewhat standard "libm.a" which
  27. tc> comes with various flavors of Unix, but at least on my systems
  28. tc> (SunOS) "sin" takes its argument in radians, while the "sin"
  29. tc> routine being used by the example above apparently expects
  30. tc> degrees.
  31.  
  32. Why not provide an optional keyword like 'idempotent'?
  33.  
  34. _______________________________________________________________________________
  35. gordon day, inde electronics, +1-403-430-1446.
  36.  
  37.