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