Changeset 0b59f5 in git for Singular/LIB/general.lib
- Timestamp:
- Dec 13, 1999, 4:33:50 PM (23 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 82ed244cff3158b7a79a6eed4e0548d485960cfe
- Parents:
- 925cab8e04ecb2f3c2e451b913c11bcac28b2374
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/general.lib
r925cab r0b59f5 1 // $Id: general.lib,v 1.2 2 1999-10-22 09:07:07obachman Exp $1 // $Id: general.lib,v 1.23 1999-12-13 15:33:46 obachman Exp $ 2 2 //GMG, last modified 18.6.99 3 3 /////////////////////////////////////////////////////////////////////////////// 4 4 5 version="$Id: general.lib,v 1.2 2 1999-10-22 09:07:07obachman Exp $";5 version="$Id: general.lib,v 1.23 1999-12-13 15:33:46 obachman Exp $"; 6 6 info=" 7 7 LIBRARY: general.lib PROCEDURES OF GENERAL TYPE 8 8 9 9 PROCEDURES: 10 A_Z(\"a\",n); string a,b,... of n comma sep erated letters10 A_Z(\"a\",n); string a,b,... of n comma separated letters 11 11 ASCII([n,m]); string of printable ASCII characters (number n to m) 12 12 binomial(n,m[,../..]); n choose m (type int), [type string/type number] … … 32 32 "USAGE: A_Z(\"a\",n); a any letter, n integer (-26<= n <=26, !=0) 33 33 RETURN: string of n small (if a is small) or capital (if a is capital) 34 letters, comma sep erated, beginning with a, in alphabetical34 letters, comma separated, beginning with a, in alphabetical 35 35 order (or revers alphabetical order if n<0) 36 36 EXAMPLE: example A_Z; shows an example … … 95 95 { 96 96 string s1 = 97 " ! \" # $ 97 " ! \" # $ & ' ( ) * + , - . 98 98 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 99 99 / 0 1 2 3 4 5 6 7 8 9 : ; < = … … 137 137 "USAGE: binomial(n,k[,p]); n,k,p integers 138 138 RETURN: binomial(n,k); binomial coefficient n choose k, 139 - of type string (computed in characteristic 0)139 @* - of type string (computed in characteristic 0) 140 140 binomial(n,k,p); n choose k, computed in characteristic prime(p) 141 - of type number if a basering is present and prime(p)=char(basering)142 - of type string else141 @* - of type number if a basering is present and prime(p)=char(basering) 142 @* - of type string else 143 143 NOTE: In any characteristic, binomial(n,k) = coefficient of x^k in (1+x)^n 144 144 EXAMPLE: example binomial; shows an example
Note: See TracChangeset
for help on using the changeset viewer.