|
From: Ioannis V. <no...@ho...> - 2002-08-31 16:59:22
|
The resulting source code after the preprocessing is where in the source code was written PI to have been replaced with 3.1415 and where TWOPI is written to have been replaced with (2.0 * 3.1415). Then the whole code gets compiled. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.cjb.net <http://www.noicys.cjb.net/> * Alternative URL: http://run.to/noicys -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Scott Williams Sent: Saturday, August 31, 2002 6:05 PM To: dev...@li... Subject: [Dev-C++] Simple Question Hi, This is more of a general C question but just in case it's compiler dependent. . . I'm curious how the following is handled: #define PI 3.1415 #define TWOPI (2.0 * PI) Does this add a flop everywhere TWOPI is used or is the expression evaluated to 6.2830 and then inserted? If the latter, with what precision is the evaluation done (e.g., what does TWOPI look like if I #define PI to 20 digits?). Thanks. Scott |