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
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
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
It''s
4*atan(1)
. I''ve used it once, but it made my code longer and harder to read Not everyone knows at first glance that the previous statement is equivalent to PI...
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)
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.
so is there an actual equation to pi (as (1+sqrt(5))/2 is to phi) ? Sounds dumb but deriving the value from really precise and accurate measurements of circumfrence and radius seems awkward. Thanks ahead for curing me of another bit of ignorance!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement