in reply to Re: Pascal triange... in thread Pascal's triangle...
use constant PI => 3.141592653589793238;
since you're only calculating pi once, and inlining it, take advantage of the operating system's precision...
use constant PI => 4 * atan 1, 1;
## or as i prefer
# sub PI() { 4 * atan 1, 1 }
~Particle *accelerates*
•constant PI by merlyn (Sage) on Jun 19, 2002 at 13:16 UTC 
Or, to get rid of that nasty "4":
sub PI () { atan2 0, 1 }
 Randal L. Schwartz, Perl hacker  [reply] [d/l] 
(jeffa) 3Re: Pascal triange... by jeffa (Bishop) on Jun 19, 2002 at 17:51 UTC 
use Math::Complex;
use constant PI => pi();
# or just
pi();
jeffa
LLLLLLLLLLLL
RRRRRRRRRRRR
BBBBBBBB
HHHHHH
(the triplet paradiddle with highhat)
 [reply] [d/l] 
Re^3.14: Pascal's triangle... by particle (Vicar) on Jun 19, 2002 at 22:14 UTC 
use constant PI => 3;
;P
~Particle *accelerates*
 [reply] [d/l] [select] 

> or in kansas...
> use constant PI => 3;
Actually, in Kansas we think PI should be round,
use constant PI => sprintf("%1.0f", 3.14159265358979);
You're thinking of Oklahoma...
YuckFoo
 [reply] 
Re(3): Pascal triange... by gumby (Scribe) on Jun 19, 2002 at 11:45 UTC 
use constant PI => 4 * atan2 1, 1;
I can recall from memory more than 700 digits of pi ;)  [reply] [d/l] 
Re: Re^2: Pascal's triangle... by theorbtwo (Prior) on Jun 19, 2002 at 22:26 UTC 
BTW, that's the FPU's precision, not the OS's. (On machines that have an FPU, anyway.)
/me is pedantic sometimes
We are using here a powerful strategy of synthesis: wishful thinking.  The Wizard Book
 [reply] 
