| integer functions |
| !, fact | factorial, n!=fact(n)= productfor(i,1,n,i) |
| !!, ffact | n!!=ffact(n)= productfor(i,0,n/2-1,n-2*i) |
| combin, nCr | combination, n nCr k = n!/(n-k)!/k! |
| permut, nPr | variation, n nPr k = n!/(n-k)! |
| gcd | the greatest common divisor |
| lcm | the least common multiple, lcm(a,b)=a*b/gcd(a,b) |
| divisor | the least prime divisor of an operand |
| prime | prime that is greater then an operand |
| isprime | isprime(n)=(divisor(n)==n) |
| fibon | Fibonacci, fibon(n)=fibon(n-1)+fibon(n-2) |
| angle conversions |
| radtodeg | converts radians to degrees, radtodeg x= x/pi*180 |
| degtorad | converts degrees to radians |
| radtograd | converts radians to gradients, radtograd x= x/pi*200 |
| gradtorad | converts gradients to radians |
| degtograd | converts degrees to gradients, degtograd x= x*10/9 |
| gradtodeg | converts gradients to degrees |
| deg , ° | converts degrees to the current units |
| rad | converts radians to the current units |
| grad | converts gradients to the current units |
| todeg | converts the current units to degrees |
| torad | converts the current units to radians |
| tograd | converts the current units to gradients |
| dms | converts degrees, minutes and seconds to degrees, the integer part is degrees, two digits after a decimal point are minutes, next two digits are seconds, next digits are tenth of a second, hundredth of a second, ... |
| todms | inverse function to dms |
| matrices |
+, -, ==, <>, and, or, xor, lsh, rsh, real, imag, conjg, round, trunc, floor, ceil, frac |
| width | number of columns |
| height | number of rows |
| matrix(r,c) | zero matrix which has r rows and c columns |
| count | count A= width A * height A |
, | concatenation alongside, operands must have the same number of rows |
\ | concatenation below, operands must have the same number of columns |
* | matrix multiplication or scalar multiplication |
| vert | vector product, A vert B=(A[1]*B[2]-A[2]*B[1], A[2]*B[0]-A[0]*B[2], A[0]*B[1]-A[1]*B[0]) |
/ | A/B= A*invert B |
| ^ | A^n= productfor(i,1,n,A); A^(-n)=1/(A^n) |
| invert | inverted matrix, invert A= 1/A= A^(-1) |
| det | determinant |
| rank | count of linearly independend rows |
| transp, ‘ | diagonal symmetry |
| elim | elimination method that makes elementary transformations with rows |
| solve | simultaneous linear equations, every row represents one equation, last column is the right side of equations, (number of columns) = 1 + (number of variables), number of rows is not restricted, but it is usually same as number of variables |
| abs | vector length, matrix norm, abs A= sqrt sumq A |
| angle | angle between two vectors, angle(A,B)=acos(A*B/abs(A)/abs(B)) |
| polynom | polynom(x,A)=sumfor(i,0,count A-1, A[i]*x^i) |
| sort | sort items from lesser to greater |
| sortd | sort items from greater to lesser |
| reverse | change order of items from last to the first |
| loops |
| for(x,a,b,f(x)) | values from a to b are assigned to variable x and command f is executed, result is 0, f can modify variables, f can contain command if, return, ... |
| foreach(x,A,f(x)) | this function is similar to for except that every element of matrix A is assigned to variable x |
| sumfor(x,a,b,f(x)) | S=0; for(x,a,b,S=S+f(x)); S |
| productfor(x,a,b,f(x)) | S=1; for(x,a,b,S=S*f(x)); S |
| listfor(x,a,b,f(x)) | row vector which contains values f(x) where x is from a to b. If f(x) returns column vectors, then listfor returns matrix. If a>b then listfor returns 0. |
| rowsfor(x,a,b,f(x)) | column vector which contains values f(x) where x is from a to b. If f(x) returns row vectors, then rowsfor returns matrix. If a>b then rowsfor returns 0. |
| minfor(x,a,b,f(x)) | min(listfor(x,a,b,f(x))) |
| maxfor(x,a,b,f(x)) | max(listfor(x,a,b,f(x))) |
| filterfor(x,a,b,f(x)) | row vector of x values from a to b for which f(x) is nonzero |
| sumforeach, productforeach, listforeach, rowsforeach, minforeach, maxforeach, filterforeach - these functions are similar to the foregoing functions, but the x values are taken from matrix A |
| integral(x,a,b,n,f(x)) | integral from a to b from function f(x), n is precision (number of correct decimal digits, other digits are wrong !), if n>=100 then n is duration in milliseconds |
| statistical functions |
| min | minimal value |
| max | maximal value |
| med | median, middle value |
| mode | most frequent value |
| sum | total sum |
| sumq | sum of squared values |
| product | product |
| ave, mean | mean, ave=sum/count |
| aveq, meanq | mean of squared values, aveq=sumq/count |
| geom | geometric mean, geom=count#product |
| agm | arithmetic–geometric mean |
| harmon | harmonic mean, harmon(A)=count(A)/sumforeach(x,A,1/x) |
| var | variance, var=(sumq-sum^2/count)/(count-1) |
| vara | variance of population, vara=aveq-ave^2 |
| stdev | standard deviation, stdev=sqrt(var) |
| stdeva | standard deviation of population, stdeva=sqrt(vara) |
| linear regression |
| Points in a plane are represented by a matrix which has two columns. The first column contains x coordinates, the second column contains y coordinates. Functions lra and lrb get coeficients of line y=a+b*x which goes through the points. If all points are exactly on the line, then function lrr returns 1 or -1. |
| lra | lra=(sumy-b*sumx)/n |
| lrb | lrb=(n*sumxy-sumx*sumy)/(n*sumxq-sumx^2) |
| lrr | correlation coeficient, lrr=(n*sumxy-sumx*sumy)/sqrt((n*sumxq-sumx^2)*(n*sumyq-sumy^2)) |
| lrx | lrx(D,y)=(y-lra D)/lrb D |
| lry | lry(D,x)=lra D + x*lrb D |
| sumx | sumx D= sum D[][0] |
| sumy | sumy D= sum D[][1] |
| sumxy | sumxy D= sumfor(i,0, height data-1, data[i][0]*data[i][1]) |
| sumxq, sumyq, avex, avey, avexq, aveyq, varx, vary, varxa, varya, stdevx, stdevy, stdevxa, stdevya |