Post Reply 
(19C/29C) (k-)Permutations, Combinations, Linear Regression and Pseudo-random number
01-15-2020, 08:36 PM
Post: #5
RE: (19C/29C) (k-)Permutations, Combinations, Linear Regression and Pseudo-r... etc.
Thanks for these tips.

(01-15-2020 08:16 PM)David Hayden Wrote:  In the factorial function, you could remove steps 7 and 8 (GSB 2, RTN) and just let control fall through to LBL 2.

True, I don't see any issue.

Also, the combinations function looks like it will overflow for large N and small K. You can avoid this by alternately multiplying and dividing. For example, compute 10C3 by doing 8 * 9 / 2 * 10 / 3. This has the remarkable property that the divisions always result in an integer value!

I have to try this; will the program fit? That is the question.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (19C/29C) (k-)Permutations, Combinations, Linear Regression and Pseudo-r... etc. - Archilog - 01-15-2020 08:36 PM



User(s) browsing this thread: 2 Guest(s)