Re: Computing binomial coefficients (puzzle)
- From: "Colin Barker" <colin.barker@xxxxxxxxxx>
- Date: Fri, 16 Nov 2007 10:20:02 +0100
"Nick Wedd" <nick@xxxxxxxxxxxxx> a écrit dans le message de news:
HdUj6OGD2MPHFAvO@xxxxxxxxxxxxxxxxxxxxxx
My code, as quoted above, took about a quarter of an hour an hour to do
"binomial(34,13,X).", and gave the answer as 927983760. Your code, as
quoted above, responded rapidly to "bin(34,13,X)." with a local stack
overflow error. This surprised me.
Nick,
Just for the record, after making minor changes to your code to take into
account differences in syntax and what have you, "binomial(34,13,X)" took
just over 30 seconds with Visual Prolog, giving 927983760. Yes, I know
Visual Prolog is not really Prolog, and indeed Bart's version cannot be
converted directly to Visual Prolog.
--
Colin
.
- References:
- Re: Computing binomial coefficients (puzzle)
- From: Nick Wedd
- Re: Computing binomial coefficients (puzzle)
- From: bart demoen
- Re: Computing binomial coefficients (puzzle)
- From: Nick Wedd
- Re: Computing binomial coefficients (puzzle)
- Prev by Date: Re: Computing binomial coefficients (puzzle)
- Next by Date: Re: Which prolog to embed in a win32 app?
- Previous by thread: Re: Computing binomial coefficients (puzzle)
- Index(es):