Re: Computing binomial coefficients (puzzle)



"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






.