=head1 NAME int.cam - a CAMILA library for small integers (-32768..32767) =head1 SYNOPSYS intAvg(l:INT-seq,p:INT):INT intSUM(l:INT-seq):INT intMIN(s:INT-set):INT intMAX(s:INT-set):INT intMUL(l:INT-seq):INT intPot(a:INT,b:INT):INT intSet2IncIntSeq(s:INT-set):INT-seq intSet2IntSeq(s:INT-set):INT-seq intFF2index(ff:A->INT):A-seq intAsRealRound(n:INT,i:INT):INT intAsReal2STR(i:INT,d:INT):STR =head1 DESCRIPTION This library provides a few functions useful in simple integer arithmetics. Note that CAMILA type INT ranges from -32768 to 32767. For long integer arithmetics other data types are required. The informal semantics of the operators are as follows: =over 4 =item intAvg(l:INT-seq,p:INT):INT intAvg(l,p) averages sequence l of integers, p adds decimal precision. =item intSUM(l:INT-seq):INT intSUM(l) sums sequence l of integers. =item intMIN(s:INT-set):INT intMIN(s) computes minimum of a set of INT. =item intMAX(s:INT-set):INT intMIN(s) computes maximum of a set of INT. =item intMUL(l:INT-seq):INT intMUL(l) reduces sequence l of integers via multiplication. =item intPot(a:INT,b:INT):INT intPot(a,b) computes a^b. =item intSet2IncIntSeq(s:INT-set):INT-seq intSet2IncIntSeq(s) sorts s in INT-increasing order. =item intSet2IntSeq(s:INT-set):INT-seq intSet2IntSeq(s) sorts s in INT-decreasing order. =item intFF2index(ff:A->INT):A-seq intFF2index(ff) builds index of ff (range INT-increasing ordering). =item intAsRealRound(n:INT,i:INT):INT intAsRealRound(n,i) regards n as a real number with i decimal places and rounds it. =item intAsReal2STR(i:INT,d:INT):STR intAsReal2STR(n,i) regards n as a real number with i decimal places and converts into to a string. =back =head1 SEE ALSO No include commands found. =head1 AUTHOR J.N. Oliveira (jno@di.uminho.pt)