Date: Fri, 5 Nov 2010 14:21:40 -0400 From: Alejandro Imass <ait@p2ee.org> To: Polytropon <freebsd@edvax.de> Cc: FreeBSD Mailing list <freebsd-questions@freebsd.org> Subject: Re: how to generate pi in c Message-ID: <AANLkTikO94YnpiH6%2BsbJFvWOmgXR-kY-sJQe7ky%2B8qu0@mail.gmail.com> In-Reply-To: <20101105191359.2c047c29.freebsd@edvax.de> References: <AANLkTikaBYi0d4dvLnc=vxuPDWQHDqrVJrz=iVkECeO=@mail.gmail.com> <AFAF0F44-48A3-462A-8EA5-005E838AE44E@elvandar.org> <AANLkTik62acvRKx71sQ%2Bwqd%2BKb=auqb_NQkxT9F6y-Yr@mail.gmail.com> <20101105191359.2c047c29.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 5, 2010 at 2:13 PM, Polytropon <freebsd@edvax.de> wrote: > On Fri, 5 Nov 2010 13:39:05 -0400, Alejandro Imass <ait@p2ee.org> wrote: >> This is how I do it in perl >> use constant PI =3D> 4 * atan2(1, 1); >> >> In C it owuld probably be (using math.h): >> >> pi =3D 4.0*atan(1.0); > > Or use M_PI from /usr/include/math.h, as we already #include'd > it. :-) > > #define M_PI =A0 =A0 =A0 =A0 =A0 =A03.14159265358979323846 > jaja. live and learn > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikO94YnpiH6%2BsbJFvWOmgXR-kY-sJQe7ky%2B8qu0>