Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Binomial Golf

by Arguile (Hermit)
on May 30, 2001 at 15:23 UTC ( #84221=note: print w/ replies, xml ) Need Help??


in reply to Re: Binomial Golf
in thread Binomial Golf

Check the thread Binomial Expansion there's a really interesting n choose r sub there by ariels and a proof underneath by japhy. (Among other things)

# copy of said subroutine sub nCr { my ($n, $r) = @_; my $res = 1; for my $i (1..$r) { $res *= $n--; $res /= $i; } $res; }


Comment on Re: Re: Binomial Golf
Download Code
Re: Re: Re: Binomial Golf
by gumpu (Friar) on May 30, 2001 at 15:50 UTC

    Thanks! That's a very elegant solution. I spend a day or so comming up with a program to do the same. And that was about a page long. Very nifty.

    Have Fun

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://84221]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2015-07-04 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls