Assuming your using a 387 chip or above...
There is actually an intruction to push an 80-bit value of pi onto the FPU register stack. It saves you the expense of a memory call and you get the extended-precision (80-bit) value. Only use it if you are looking to eek out an extra fraction of a microsecond of CPU time.
a number for pi
February 09, 2003 05:41 PM
3.1415926 is tedious
3.1415926 is a literal
3.1415926 is an f9
3.1415926 is good enough
3.1415926 is good enough for many applications
3.1415926 is the latest
3.1415926 is a constant or numeric literal
3.1415926 is a real number
3.1415926 is a magic number ? pi is a good identifier
3.1415926 is closer to
3.1415926 is less than pi
3.1415926 is the value i used for pie
3.1415926 is not an int
3.1415926 is a literal
3.1415926 is an f9
3.1415926 is good enough
3.1415926 is good enough for many applications
3.1415926 is the latest
3.1415926 is a constant or numeric literal
3.1415926 is a real number
3.1415926 is a magic number ? pi is a good identifier
3.1415926 is closer to
3.1415926 is less than pi
3.1415926 is the value i used for pie
3.1415926 is not an int
February 09, 2003 05:41 PM
3.1415926 is tedious
3.1415926 is a literal
3.1415926 is an f9
3.1415926 is good enough
3.1415926 is good enough for many applications
3.1415926 is the latest
3.1415926 is a constant or numeric literal
3.1415926 is a real number
3.1415926 is a magic number ? pi is a good identifier
3.1415926 is closer to
3.1415926 is less than pi
3.1415926 is the value i used for pie
3.1415926 is not an int
3.1415926 is a literal
3.1415926 is an f9
3.1415926 is good enough
3.1415926 is good enough for many applications
3.1415926 is the latest
3.1415926 is a constant or numeric literal
3.1415926 is a real number
3.1415926 is a magic number ? pi is a good identifier
3.1415926 is closer to
3.1415926 is less than pi
3.1415926 is the value i used for pie
3.1415926 is not an int
Can''t you just take the atn(4) ? actually it might be atn(8)...
If necessity is the mother of all invention then laziness is the father... and man am I lazy!
It''s
Not everyone knows at first glance that the previous statement is equivalent to PI...
4*atan(1)
. I''ve used it once, but it made my code longer and harder to read 
But if you store the value in a variable named pi, then people will know, nor will it make the code harder to read than a hardcoded variable.
quote:
Original post by MatKing
Can''t you just take the atn(4) ? actually it might be atn(8)...
nop it''s 2*atan(infinite)
Visit our homepage: www.rarebyte.de.stGA
February 13, 2003 06:21 PM
quote:
Original post by pawn69
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647
Hey... good approximation!
This could be interesting:
www.hut.fi/~mnippula/votepi.html
As could this:
lcf.www9.50megs.com/pi.html
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
www.hut.fi/~mnippula/votepi.html
As could this:
lcf.www9.50megs.com/pi.html
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement