On 11 November 2010 12:06, Wojciech Puchar woj...@tensor.gdynia.pl wrote:
Does anyone has a generate-pi.c source code?
atanl(1)
Er, arc tan of 1 is pi/4.
Try atanl(1)*4, or for a less wasteful instruction try using the constant M_PI
Also, forgive me if I'm wrong, but this looks like a
Does anyone has a generate-pi.c source code?
atanl(1)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Ian Smith smi...@nimnet.asn.au wrote:
In freebsd-questions Digest, Vol 335, Issue 11, Message: 4
On Sat, 06 Nov 2010 01:00:34 -0700 per...@pluto.rain.com wrote:
Julian Fagir g...@physik.tu-berlin.de wrote:
Does anyone has a generate-pi.c source code?
...
1 #include stdlib.h
On Tue, 9 Nov 2010, per...@pluto.rain.com wrote:
Ian Smith smi...@nimnet.asn.au wrote:
In freebsd-questions Digest, Vol 335, Issue 11, Message: 4
On Sat, 06 Nov 2010 01:00:34 -0700 per...@pluto.rain.com wrote:
Julian Fagir g...@physik.tu-berlin.de wrote:
Does anyone has a
Hi,
just to get more off-topic... ;-)
On Mon, 8 Nov 2010 20:01:19 +1100 (EST)
Ian Smith smi...@nimnet.asn.au wrote:
And while a square enclosing a circle, it's hardly squaring the circle:
http://en.wikipedia.org/wiki/Squaring_the_circle .. but an interesting
read nonetheless for unrequited
In freebsd-questions Digest, Vol 335, Issue 11, Message: 4
On Sat, 06 Nov 2010 01:00:34 -0700 per...@pluto.rain.com wrote:
Julian Fagir g...@physik.tu-berlin.de wrote:
Does anyone has a generate-pi.c source code?
...
1 #include stdlib.h
2 #include string.h
3 #include stdio.h
Julian Fagir g...@physik.tu-berlin.de wrote:
Does anyone has a generate-pi.c source code?
...
1 #include stdlib.h
2 #include string.h
3 #include stdio.h
4
5 // Change this for a more accurate result.
6 long max = 1;
7 double a, b;
8 double pi;
9 long counter;
Does anyone has a generate-pi.c source code?
Thanks.. :D :\
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
No, but a simple search reveals some information;
http://einstein.drexel.edu/courses/Comp_Phys/General/C_basics/
On Nov 5, 2010, at 5:40 PM, Arthur Bela wrote:
Does anyone has a generate-pi.c source code?
Thanks.. :D :\
--
/\ Best regards,| re...@freebsd.org
\
This is how I do it in perl
use constant PI = 4 * atan2(1, 1);
In C it owuld probably be (using math.h):
pi = 4.0*atan(1.0);
On Fri, Nov 5, 2010 at 1:15 PM, Remko Lodder re...@elvandar.org wrote:
No, but a simple search reveals some information;
On Fri, 5 Nov 2010 13:39:05 -0400, Alejandro Imass a...@p2ee.org wrote:
This is how I do it in perl
use constant PI = 4 * atan2(1, 1);
In C it owuld probably be (using math.h):
pi = 4.0*atan(1.0);
Or use M_PI from /usr/include/math.h, as we already #include'd
it. :-)
#define M_PI
On Fri, Nov 5, 2010 at 2:13 PM, Polytropon free...@edvax.de wrote:
On Fri, 5 Nov 2010 13:39:05 -0400, Alejandro Imass a...@p2ee.org wrote:
This is how I do it in perl
use constant PI = 4 * atan2(1, 1);
In C it owuld probably be (using math.h):
pi = 4.0*atan(1.0);
Or use M_PI from
В Fri, 5 Nov 2010 13:39:05 -0400
Alejandro Imass a...@p2ee.org пишет:
This is how I do it in perl
use constant PI = 4 * atan2(1, 1);
In C it owuld probably be (using math.h):
pi = 4.0*atan(1.0);
On Fri, Nov 5, 2010 at 1:15 PM, Remko Lodder re...@elvandar.org
wrote:
No, but a
В Fri, 5 Nov 2010 13:39:05 -0400
Alejandro Imass a...@p2ee.org пишет:
This is how I do it in perl
use constant PI = 4 * atan2(1, 1);
In C it owuld probably be (using math.h):
pi = 4.0*atan(1.0);
On Fri, Nov 5, 2010 at 1:15 PM, Remko Lodder re...@elvandar.org
wrote:
No, but a
Hi,
Does anyone has a generate-pi.c source code?
The solution of Ivan Klymenko is surely much more suffisticated, but as I
wrote this down, I just want to publish it... ;-)
1 #include stdlib.h
2 #include string.h
3 #include stdio.h
4
5 // Change this for a more accurate result.
6
On Fri, Nov 05, 2010 at 05:40:39PM +0100, Arthur Bela wrote:
Does anyone has a generate-pi.c source code?
Search for pi spigot algorithm.
Here is a tiny C program from Jeremy Gibbon's Unbounded Spigot paper
(due to Dik Winter and Achim Flammenkamp):
16 matches
Mail list logo