Date: Wed, 4 Mar 1998 10:29:55 +0200 (IST) From: Eli Zaretskii To: Lawrence Kirby cc: djgpp AT delorie DOT com Subject: Re: trigonometry problem (math.h) In-Reply-To: <888961507snz@genesis.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 3 Mar 1998, Lawrence Kirby wrote: > >#include /* define M_PI and sin() */ > > Note however that the C language does not permit a C compiler to define > M_PI in . ANSI C doesn't define M_PI, but Posix does. It certainly doesn't make sense to roll your own value for PI if one is already available, since defining accurate float constants can be tricky. All modern Unix compilers have this constant, and at least some DOS ones (e.g., Borland C) do as well. So I think it is safe to use, perhaps with the following safeguard: #include #ifndef M_PI #define M_PI 3.14159 /* use as many digits as you need */ #endif