Changeset 883957 in git


Ignore:
Timestamp:
Aug 20, 2008, 6:33:40 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c5facdfddea2addfd91babd8b9019161dea4b695')
Children:
40b63ead1005d1da7376efe37adc7c1a5b9f55e8
Parents:
cb1ed27860675e098e88124eba57212b35769e9d
Message:
*hannes: binomial example


git-svn-id: file:///usr/local/Singular/svn/trunk@11018 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/general.lib

    rcb1ed27 r883957  
    33//eric, added absValue 11.04.2002
    44///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: general.lib,v 1.56 2008-03-18 14:57:15 Singular Exp $";
     5version="$Id: general.lib,v 1.57 2008-08-20 16:33:40 Singular Exp $";
    66category="General purpose";
    77info="
     
    195195example
    196196{ "EXAMPLE:"; echo = 2;
    197    binomial(200,100);"";                   //type string, computed in char 0
     197   binomial(200,100);"";                 //type bigint
    198198   int n,k = 200,100;
     199   bigint b1 = binomial(n,k);           
    199200   ring r = 0,x,dp;
    200    number b1 = binomial(n,k,0);            //type number, computed in ring r
    201    poly b2 = coeffs((x+1)^n,x)[k+1,1];     //coefficient of x^k in (x+1)^n
    202    b1-b2;                                  //b1 and b2 should coincide
     201   poly b2 = coeffs((x+1)^n,x)[k+1,1];  //coefficient of x^k in (x+1)^n
     202   b1-b2;                               //b1 and b2 should coincide
    203203}
    204204///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.