We list all the built-in functions here. Each entry starts with the function name and its 'signature'.The signature is an informal (and suggestive) rule that tells us how the function is used. It should be self-evident how to interpret the signature. For example: frac means a fraction, fraclist means a list of fractions enclosed inside '[' and ']', int>0 means positive integer.
Example(s) are included at the end of most entries. Please refer to the <a href='#chap_cuecard'>cuecards</a> for additional examples, which are especially valuable for the understanding of the interpretation of lists in the contexts of polynomials, matrices, etc.
Index:
abs
ceil
cmp
comb
eqfd
eqfn
floor
gcd
getd
getn
isint
lcd
lcm
max
min
m#add
m#det
m#dimc
m#dimr
m#inv
m#mul
m#smul
m#sub
m#tr
m#tsp
n#facp
n#facr
orad
orae
parf
pari
perm
p#add
p#comp
p#deg
p#div
p#eval
p#mod
p#mul
p#pow
p#sub
q#add
q#conj
q#div
q#mul
q#sub
ran
round
sgn
s#add
s#det
s#dim
s#inv
s#mul
s#smul
s#sub
s#tr
s#tsp
x#solve
I1. abs(frac):frac
absolute value abs(a) = |a| = magnitude of a (without the sign) See also: index
|
I2. ceil(frac):int
ceiling ceil(a) = the smallest integer ≥ a
|
I3. cmp(frac,frac):-1,0,1
comparison of numerical values cmp(a,b) = -1, 0 or 1 according to if a<b, a=b, or a>b See also: index
|
I4. comb(int≥0,int≥0):int≥1
number of combinations comb(n,k) = k-combination of n Number of combinations of k objects from a set of n objects. Note:
0 ≤ k ≤ n
|
I5. eqfd(frac,frac):frac
denominator of equivalent fraction with given numerator eqfd(a,b) = the denominator of the fraction, whose numerator is b, equivalent to a It is the solution to the equation: a = ?/b. Note:
The intent of eqfn is to perform the opposite of 'reduction to lowest terms'. Hence if the question is posed correctly, then the signature is eqfn(frac,int):int as illustrated by the examples.
|
I6. eqfn(frac,frac):frac
numerator of equivalent fraction with given denominator eqfn(a,b) = the numerator of the fraction, whose denominator is b, equivalent to a. It is the solution to the equation: a = b/?. Note:
The intent of eqfn is to perform the opposite of 'reduction to lowest terms'. Hence if the question is posed correctly, then the signature is eqfn(frac,int):int as illustrated by the examples.
|
I7. floor(frac):int
floor floor(a) = the largest integer ≤ a
|
I8. gcd(int,...):int
greatest common divisor gcd(a,b,...) = the greatest common divisor of integers a, b, ... Note:
Signs are ignored, the result is a positive integer.
|
I9. getd(frac):int>0
get denominator getd(a) = the denominator of a (after a is reduced to the lowest terms) Note:
the result is always a positive integer
|
I10. getn(frac):int
get numerator getn(a) = the numerator of a (after a is reduced to the lowest terms)
|
I11. isint(frac):0,1
the quot;booleanquot; function: isInteger isint(a) = 0 or 1 according to if a is an integer or not Note:
isint is a quot;booleanquot; function if we interpret 0 as false, and 1 as true. See also: index
|
I12. lcd(frac,...):int>0
least common denominator comd(a,b,...) = the least common denominator of fractions a, b, ... Note:
The result is always a positive integer. See also: index
|
I13. lcm(int,...):int
least common multiple lcm(a,b,...) = the least (positive) common multiple of integers a, b, ... Note:
Signs are ignored, the result is a positive integer.
|
I14. max(frac,...):frac
maxium max(a,b,...) = the maxium of a, b, ...
|
I15. min(frac,...):frac
minimum min(a,b,...) = the minimum of a, b, ...
|
I16. m#add(fraclist,fraclist):fraclist
addition of two matrices Note:
The matrix representation lists contain matrix dimensions.
|
I17. m#det(fraclist):frac
determinant of a matrix Note:
The matrix must be square, its representation list contains the dimensions.
|
I18. m#dimc(fraclist):int>0
column-dimension (number of columns) of a matrix Note:
The matrix representation list contains matrix dimensions.
|
I19. m#dimr(fraclist):int>0
row-dimension (number of rows) of a matrix Note:
The matrix representation list contains matrix dimensions.
|
I20. m#inv(fraclist):frac
inverse of a matrix Note:
The matrix must be square, and its representation list contains matrix dimension. The result is an empty list if the matrix is NOT invertible.
|
I21. m#mul(fraclist,fraclist):fraclist
multiplication of two matrices Note:
The matrix representation lists contain matrix dimensions.
|
I22. m#smul(frac,fraclist):fraclist
scalar multiplication of matrix Note:
The matrix representation list contains matrix dimensions.
|
I23. m#sub(fraclist,fraclist):fraclist
subtraction of two matrices Note:
The matrix representation lists contain matrix dimensions.
|
I24. m#tr(fraclist):frac
trace of a matrix Note:
The matrix must be square, its representation list contains the dimensions.
|
I25. m#tsp(fraclist):frac
transpose of a matrix Note:
The matrix representation list contains matrix dimensions.
|
I26. n#facp(int>1):fraclist
prime factorization of an integer n#facp(n) returns a list of n's unique prime factors and their respective powers\
|
I27. n#facr(int>1):fraclist
prime factorization of an integer n#facr(n) returns a list of n's prime factors, repeated as many times as necessary
|
I28. orad(frac,int>0):frac
optimal rational approximation constrainted by denominator orad(a,b) = optimal approximation of fraction a subject to the constraint that the denominator does not exceed b. The fraction b must be a positive integer.
|
I29. orae(frac,frac≥0):frac
optimal rational approximation constrainted by error orae(a,b) = optimal approximation of fraction a subject to the constraint that the error does not not exceed b. The fraction b must be zero or positive.
|
I30. parf(frac):0≤frac<1
fractional part parf(a) = the fractional part of a Note:
The result is always between 0 (inclusive) and 1 (exclusive).
|
I31. pari(frac):int
integer part parti(a) = the integral part of a Note:
It is actually truncation away from zero.
|
I32. perm(int≥0,int≥0):int≥1
number of permutations perm(n,k) = k-permutation of n Number of permutations of k objects from a set of n objects. Note:
0 ≤ k ≤ n
|
I33. p#add(fraclist,fraclist):fraclist
addition of two polynomials See also: index
|
I34. p#comp(fraclist,fraclist):fraclist
composition of two polynomials When polynomials are regarded as functions of x, p#(f,g) is the polynomial defined by (fog)(x) = f(g(x)). See also: index
|
I35. p#deg(fraclist):int≥0
degree of a polynomial See also: index
|
I36. p#div(fraclist,fraclist):fraclist
quotient of long division of two polynomials See also: index
|
I37. p#eval(fraclist,frac):frac
evaluation of polynomial See also: index
|
I38. p#mod(fraclist,fraclist):fraclist
remainder of long division of two polynomials See also: index
|
I39. p#mul(fraclist,fraclist):fraclist
multiplication of two polynomials See also: index
|
I40. p#pow(fraclist,int≥0):fraclist
power of a polynomial Note:
The exponent must be a non-negative integer: 0, 1, 2, 3, ... See also: index
|
I41. p#sub(fraclist,fraclist):fraclist
subtraction of two polynomials See also: index
|
I42. q#add(fraclist,fraclist):fraclist
addition of two quadratic surd expressions See also: index
|
I43. q#conj(fraclist):fraclist
conjugation of a quadratic surd expression See also: index
|
I44. q#div(fraclist,fraclist):fraclist
quotient of two quadratic surd expressions See also: index
|
I45. q#mul(fraclist,fraclist):fraclist
multiplication of two quadratic surd expressions See also: index
|
I46. q#sub(fraclist,fraclist):fraclist
subtraction of two quadratic surd expressions See also: index
|
I47.
ran(int):int
ran(frac,frac):frac
random number
Note:
The result is random, it changes from run to run. See also: index
|
I47. ran(int):int
ran(frac,frac):frac random number ran(n) = a random integer in the range: 0, 1, ..., n-1; where n is a positive integer ran(f,g) = a random fraction between f and g inclusive. The granularity of the random numbers depend on the least common denominators of the arguments. Specifically, if the least common denominator is c, and the arguments are a/c and b/c respectively, then the random number is d/c where d is an integer between a and b inclusive. Note:
The result is random, it changes from run to run. See also: index
|
I48. round(frac):int
round round(a) = the integer closest to a; or the integer further from zero if there is a tie Note:
round(-a) = -round(a)
|
I49. sgn(frac):-1,0,1
sign sgn(a) = -1, 0, or 1 according to if a is negative, zero, or positive. Note:
The sign of INVALID is INVALID. See also: index
|
I50. s#add(fraclist,fraclist):fraclist
addition of two square matrices Note:
The matrix representation lists do NOT contain matrix dimensions.
|
I51. s#det(fraclist):frac
determinant of a square matrix Note:
The matrix representation list does NOT contain matrix dimension.
|
I52. s#dim(fraclist):int>0
dimension (number of rows and columns) of a square matrix Note:
The matrix representation list does NOT contain matrix dimension.
|
I53. s#inv(fraclist):frac
inverse of a square matrix Note:
The matrix representation list does NOT contain matrix dimension. The result is an empty list if the matrix is NOT invertible.
|
I54. s#mul(fraclist,fraclist):fraclist
multiplication of two square matrices Note:
The matrix representation lists do NOT contain matrix dimensions.
|
I55. s#smul(frac,fraclist):fraclist
scalar multiplication of square matrix Note:
The matrix representation list does NOT contain matrix dimension.
|
I56. s#sub(fraclist,fraclist):fraclist
subtraction of two matrices Note:
The matrix representation lists do NOT contain matrix dimensions.
|
I57. s#tr(fraclist):frac
trace of a square matrix Note:
The matrix representation list does NOT contain matrix dimension.
|
I58. s#tsp(fraclist):frac
transpose of a square matrix Note:
The matrix representation list does NOT contain matrix dimension.
|
I59. x#solve(fraclist):fraclist
solving system of linear equations See also: index
|