source: git/Tst/Manual/binomial.tst @ c2f6bd

spielwiese
Last change on this file since c2f6bd was 894057, checked in by Oleksandr Motsak <motsak@…>, 13 years ago
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
  • Property mode set to 100644
File size: 311 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "general.lib";
3binomial(200,100);"";                 //type bigint
4int n,k = 200,100;
5bigint b1 = binomial(n,k);
6ring r = 0,x,dp;
7poly b2 = coeffs((x+1)^n,x)[k+1,1];  //coefficient of x^k in (x+1)^n
8b1-b2;                               //b1 and b2 should coincide
9tst_status(1);$
Note: See TracBrowser for help on using the repository browser.