|
| Function Name:
|
abs
|
| Function Syntax:
|
abs(x)
|
| Function Description:
|
Returns the absolute value of the argument.
|
| Parameters:
|
x: any
integer or real numbers. |
| Example: |
V0 =
I[-15,15,3:5,0]
V1 = R.3(abs(V0)) |
|
Notes: |
| Function Name:
|
acos
|
| Function Syntax:
|
acos(x)
|
| Function Description:
|
The arc cosine in radians of x, -1.0 <= x <= 1.0.
|
| Parameters:
|
x: an angle
in radians. |
| Example: |
V0 =
I[3,20,2:7,9]
V1 = R.11(acos(V0)) |
|
Notes: |
| Function Name:
|
asin
|
| Function Syntax:
|
asin(x)
|
| Function Description:
|
The arc sine in radians of x, -1.0 <= x <= 1.0.
|
| Parameters:
|
x: an angle
in radians. |
| Example: |
V0 = I[1,15:5]
V1 = R.3(asin(V0)) |
|
Notes: |
| Function Name:
|
assert
|
| Function Syntax:
|
assert('condition')
assert('condition_1','condition_2',...)
|
| Function Description:
|
This is a system level "E-type" function.
The function evaluates arguments, and if at least one produces result equivalent to "false",
the function restarts the randomization engine. This function can make the template to work
very slow, or even crash. It could be used to fast eliminate undesired randomizations.
IMPORTANT: All tested conditions must have a high probability to succeed.
|
| Parameters:
|
'condition': a test (most often inequality) that involves other random variables. You can use '!=', '<=', and '>=', for
'not equal to', 'less than or equal' and 'greater than or equal' respectively. |
| Example: |
V1=I[-20,20]
V2=I[-20,20]
V3=R.6(1/(V1+V2))
V4=E"assert('V1+V2 != 0')
The last line will guarantee that there is
no division by 0 in V3. |
|
Notes: |
| Function Name:
|
atan
|
| Function Syntax:
|
atan(x)
|
| Function Description:
|
The arc tangent in radians of x.
|
| Parameters:
|
x is an
angle in radians. |
| Example: |
V0 = I[2,15,3]
V1 = R.11(atan(V0)) |
|
Notes: |
| Function Name:
|
atan2
|
| Function Syntax:
|
atan2(x,y) |
| Function Description:
|
The angle in radians between the positive x-axis and the point (x, y)
measured in the counter-clockwise direction.
|
| Parameters:
|
x and y are
real numbers representing the x- and y-coordinates on a
graph. |
| Example: |
V0 = R.1[-9,9]
V1 = R.1[-9,9]
V2 = R.3(atan2(V0,V1)) |
|
Notes: |
| Function Name:
|
bestfit
|
| Function Syntax:
|
bestfit(type,x,y) |
| Function Description:
|
Line of Best Fit for two lists.
|
| Parameters:
|
x: list of
comma separated numbers (arguments)
y: list of comma separated numbers (values)
type: type of the result for the line
type="0" :returns coef. "a" in "y=a+b*x"
type="1" :returns coef. "b" in "y=a+b*x"
type="-1" :returns list of values a+b*x_i.
|
| Example: |
V1 =
R.3[-0.039,-0.012]
V2 = R.3[28.052,36.012]
V3 = I[201, 380]
V4 = I(V1*V3+V2)
V5 = I[150, 380:V3]
V6 = I(V1*V5+V2)
V7 = I[150, 380:V3,V5]
V8 = I(V1*V7+V2)
V9 = R.3(bestfit(0,'V3,V5,V7','V4,V6,V8'))
|
|
Notes: |
| Function Name:
|
beta
|
| Function Syntax:
|
beta(a,b) |
| Function Description:
|
(Beta
Function)
beta(a,b) = gamma(a)*gamma(b)/gamma(a+b).
|
| Parameters:
|
a and b are
real numbers. |
| Example: |
V0 =
R.2[1.55,13.44:10]
V1 = R.2(V0*1.87)
V2 = R.4(beta(V0,V1)) |
|
Notes: |
| Function Name:
|
boxit
|
| Function Syntax:
|
boxit('string') |
| Function Description:
|
E-type function, used to box in a number or text
|
| Parameters:
|
('string') = any numeric or text string
|
| Example: |
E"boxit('456')"
To add spacing around the box:
V2=S"$space:h10w5:m$"    then,
V3=E"boxit('V2stringV2')" |
|
Notes: |
| Function Name:
|
bpd
|
| Function Syntax:
|
bpd(p,n,r) |
| Function Description:
|
Binomial probability distribution returns the probability of r
successes in n independent trials, each with a probability of success p;
returns Comb(n,r)* p^r * (1-p)^(n-r).
|
| Parameters:
|
p is real 0
< p < 1
n and r are integers: 0<=r<=n
|
| Example: |
V0 = I[65,90]
V0 = I[2,10]
V1 = I[1,V0-1]
V2 = I[1,100]
V3 = R.2(V2/100)
V4 = R*.3(bpd(V3,V0,V1)) |
|
Notes: |
| Function Name:
|
cdfrac
|
| Function Syntax:
|
cdfrac(num,den) |
| Function Description:
|
E-type function, used to display fraction.
This function is DEPRECATED. Please, use "dfrac" instead.
|
| Parameters:
|
num - the numerator of the fraction
den - the denominator of the fraction |
| Example: |
|
|
Notes: |
| Function Name:
|
ceil
|
| Function Syntax:
|
ceil(x)
|
| Function Description:
|
Smallest integer greater than x.
|
| Parameters:
|
x: any
integer or real number. |
| Example: |
V0 = I[1,9,2]
V1 = I[2,10,2]
V2 = R.2(V0/V1)
V3 = I(ceil(V2)) |
|
Notes: |
| Function Name:
|
chidist
|
| Function Syntax:
|
chidist(df,a)
|
| Function Description:
|
Returns values of the chi-squared distribution;
|
| Parameters:
|
df is an
integer between 1 and 30
and a =
{0.005, 0.01, 0.025, 0.05, 0.1, 0.9, 0.95, 0.975, 0.99, 0.995}.
|
| Example: |
V0 = I[3,30,3]
V1 = L[0.990,0.950,0.900]
V2 = R*.3((1-V2)/2)
V3 = R.2(chidist(V0,V2)) |
|
Notes: |
| Function Name:
|
chidistinv |
| Function Syntax:
|
chidistinv(df,b) |
| Function Description:
|
Area of "chi-squared distribution".
|
| Parameters:
|
df is an
integer, 1<=df<=30 "degrees of freedom"
b is real, b is greater than zero "critical value"
a=chidistinv(df,b) <=> b=chidist(df,a).
|
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
comb
|
| Function Syntax:
|
comb(n,r) |
| Function Description:
|
Calculates the arrangement, without regard to order, of n distinct
objects without repetitions taken r at a time.
|
| Parameters:
|
n and r are
positive integer values where r . n and n . 0.
|
| Example: |
V0 = I[2,9]
V1 = I[1,V0-1]
V0 = I(comb(V0,V1)) |
|
Notes: |
| Function Name:
|
corrcoef
|
| Function Syntax:
|
corrcoef(y1,y2) |
| Function Description:
|
Correlation Coefficient. |
| Parameters:
|
y1,y2: lists
of comma separated numbers (same length).
|
| Example: |
V0 =
S"V3,V7,V11,V15,V19,V23"
V1 = S"V6,V10,V14,V18,V22,V26"
V2 = R.3(corrcoef('V0','V1')) |
|
Notes: |
| Function Name:
|
cos
|
| Function Syntax:
|
cos(x)
|
| Function Description:
|
cosine of x. |
| Parameters:
|
x: an angle
in radians. |
| Example: |
V0 = I[5,5:1]
V1 = R.4(cos(V1)) |
|
Notes: |
| Function Name:
|
count
|
| Function Syntax:
|
count(s) |
| Function Description:
|
Number of elements in a list. |
| Parameters:
|
s: list of
comma separated numbers. |
| Example: |
V1 =
I(count("1,2,3,4,5,6,7,8,9,11,23,45"))
|
|
Notes: |
| Function Name:
|
daugmat
|
| Function Syntax:
|
daugmat(m,n,p,'s') |
| Function Description:
|
('E'-type
function) displays augmented matrix:
|
| Parameters:
|
m: positive
integer number of rows,
n: positive integer number of columns,
p: positive integer number of columns past bar,
s: string list of m*n elements separated with commas (elements read
across rows) - for fractions, use drfmat.
|
| Example: |
V0 =
E"daugmat(3,2,1,'1,0,0,1,1,0')"
|
|
Notes: |
| Function Name:
|
dcomb
|
| Function Syntax:
|
dcomb('n','r') |
| Function Description:
|
('E'-type
function) prettily displays n choose r, no fractions.
|
| Parameters:
|
n and r are
string. |
| Example: |
V0 = I[5,10:6]
V1 = E"dcomb('V0','0')" |
|
Notes: |
| Function Name:
|
ddint
|
| Function Syntax:
|
ddint('lower','upper','theImage',height)
|
| Function Description:
|
('E'-type
function) displays definite integral, sigma notation,
brackets etc. |
| Parameters:
|
lower and
upper are string boundaries,
theImage is image name without extension or $,
and height is the desired height of the image in pt.
|
| Example: |
V0 =
E"ddint('1','2','parenrightzd','30')"
|
|
Notes: |
| Function Name:
|
deqalign
|
| Function Syntax:
|
deqalign(n,'s') |
| Function Description:
|
('E'-type
function) displays equation lined up around sign.
|
| Parameters:
|
n is integer
number of lines,
s is colon (:) separated string of terms as such: 'left:sign:right:step
explanation:left:sign:right:step explantation...'.
Remember if there isn't 'left' or 'step
explanation', use $space$.
|
| Example: |
V0 =
E"deqalign(2,'x + y:=:2400:$space$:0.05x + 0.105y:=:180:$space$')"
|
|
Notes: |
| Function Name:
|
dformat
|
| Function Syntax:
|
dformat(num,',')
dformat(num,'E')
|
| Function Description:
|
The first form returns the number with added commas for number bigger that 1000.
The second form display a number using 'e'-notation, as a fixed point number, even for
very small or very large numbers.
|
| Parameters:
|
num - the number to format
',' - add commas to big number
'E' - expand Scientific Notation |
| Example: |
V1=E"dformat(12345,',')"
     // will return "12,345"
V2=E"dformat('1.234E32','E')"
     // will return "123400000000000000000000000000000"
V3=E"dformat('1.234E-32','E')"
     // will return "0.00000000000000000000000000000001234" |
|
Notes: |
| Function Name:
|
dfrac
|
| Function Syntax:
|
dfrac('whole', 'num', 'denom', 'options')
|
| Function Description:
|
NOTE: no evaluate, no simplify.
The function should be used for a complete term, so it should be used
as dfrac('-1','2','3') to represent -1 2/3.
|
| Parameters:
|
whole: is a
string,
num: is a string,
denom: is a string |
| Example: |
V0 = I[1,9]
V1 = I[1,7,2]
V2 = I(V1+1)
V3 = E"dfrac('V0','V1','V2')" |
|
Notes: |
| Function Name:
|
dimproper
|
| Function Syntax:
|
dimproper(x,y,'s') |
| Function Description:
|
('E'-type function) displays a reduced improper fraction, numerator, or
denominator depending on what s equals
|
| Parameters:
|
x: numerator
in integer form.
y: denominator in integer form where y cannot equal 0.
s = f returns improper fraction.
s = n returns reduced numerator.
s = d returns reduced denominator.
s = r1 returns reduced improper fraction or numerator if denominator
equals 1. |
| Example: |
V0 = I[-9,9]
V1 = I[-9,9:0]
V2 = E"dimproper(V0,V1,'r1')" |
|
Notes: |
| Function Name:
|
dint
|
| Function Syntax:
|
dint('lower','upper','theImage')
|
| Function Description:
|
('E'-type
function) displays definite integrals.
|
| Parameters:
|
lower and
upper are string boundaries,
theImage is image name without extension or $.
|
| Example: |
V0 =
E"dint('1','2','parenrightzd')"
|
|
Notes: |
| Function Name:
|
dmatdet
|
| Function Syntax:
|
dmatdet('x',m,n,'s') |
| Function Description:
|
('E'-type
function) displays matrix/determinant.
|
| Parameters:
|
x is 'mat'
for matrix (brackets), 'det' for determinant (bars), or
'paren' for matrix using parentheses,
m pos integer number of rows,
n pos integer number of columns,
s string of m*n elements separated with commas (elements read across
rows) - for fractions, use drfmat.\
|
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
dpfactors
|
| Function Syntax:
|
dpfactors(number, delimiter, expo_format, delimiter2)
|
| Function Description:
|
('E'-type
function) displays prime factors of given integer
|
| Parameters:
|
number: the
number to be tested for prime factors
delimiter: (main) delimiter, the default (if empty) is
" • "
expo_format: if equal to 'e', will use exponential format for repeating
primes
delimiter2: if not empty will be used, instead of delimiter, between
the
last 2 factors.
|
| Example: |
V0 = I[2,3]
V1 = I[2,3]
V2 = I[2,3]
V3 = I[2,5:4]
V4 = I[2,5:4]
V5 = I(V1*V2)
V6 = I(V0*V5)
V7 = I(V3*V4)
V8 = I(V6*V7)
V9 = E"dpfactors(V8,', ','e',',and')"
|
|
Notes: |
| Function Name:
|
dphase
|
| Function Syntax:
|
dphase(u,v) or dphase(u,v, opts)
dphase(x,y,'rec,...')
dphase(ro,theta,'pol,...')
|
| Function Description:
|
First form: Display a phaser with a given amplitude 'u' and a phase 'v' (in degrees).
Second form: Display a phaser for a vector given in rectangular coordinates.
Third form: Display a phaser for a vector given in polar coordinates (using radians for "theta"). |
| Parameters:
|
The first two arguments are numbers, with meaning which depends on from the format option.
The third arguments is a list options possibly including:
Arguments Format:
    One of 'rec','pol', 'pha' (default).
Result Format:
   'Rn','R.n','R*n','R*.n' (0<=n<=9), format u and v
   (if preceded by 'x' or 'y' apply only for u or v)
Create Boxes:
   'B', or 'xB' or 'yB', surround both numbers or
   amplitude only or angle only with "" tags.
|
| Example: |
|
|
Notes: |
| Function Name:
|
drad
|
| Function Syntax:
|
drad('coef', 'radicand', 'index', 'options')
|
| Function Description:
|
Displays radical expression. |
| Parameters:
|
coef: could
be empty or coefficient before the radicalradicand: string,
displays under the radical.index: indeces, optional-default is 2
|
| Example: |
V0 = I[2,9]
V1 = I[2,9]
V2 = E"drad('V0','V1','3')" |
|
Notes: |
| Function Name:
|
drfmat
|
| Function Syntax:
|
drfmat(num,den) |
| Function Description:
|
('E'-type
function) takes integer numerator and denominator of
fraction, reduces it, and displays
"num/den" (keeps improper
fraction form). |
| Parameters:
|
num: integer
value
den: integer value not equal to 0
|
| Example: |
V0 = I[1,9]
V1 = I[1,9]
V2 = E"drfmat(V0,V1)" |
|
Notes: |
| Function Name:
|
dscinot
|
| Function Syntax:
|
dscinot(num,exp,options)
dscinot(num,options)
dscinot(num,exp)
dscinot(num)
Remarks:
1. When using the third form, "exp" must be an integer number.
2. The definition of SciNot used is [+-]c*10^n, 1<=c<2.
3. The number "num" is NOT rounded before display. |
| Function Description:
|
Display/evaluate a number in scientific notation. The value returned will be a number or a visual representation based on the options.
|
| Parameters:
|
num: Usually the number to be displayed.
exp: Optional. The power to 10.
opt: Optional. Comma separated list of one or more of the following options:
'none'('no'): Do not eval. Use directly 'num' and 'exp'
'eval': (Default) Expects "num" (and "exp" if given) to be a number.
           Multiplies "num" by 10^exp. Calculates "c" and "n".
'coef': Returns only "c", coeffecient (significand) before the 10.
'exp': Returns only "n", the exponent of 10.
'calc': Returns the number c*10^n.
'B': Put both "c" and "n" in boxes for QT and YT.
'xB','yB': Put the "c" (if "xB") or the "n" (if "yB") in box.
'N%': If 'c' is boxed, use tolerance of 'N' percent.
Remarks:
1. The default return is a visual representation of the number.
2. When the exponent is in the box, the dropdown menu will exclude answers of the form c*10^n,0.1<c<1. (Very old SciNot format)
3. Some other formatting options are also accepted.
|
| Examples: |
dscinot(4/3): displays 1.333333333333333x10^0(round 'num' before use)
dscinot(120*0.234,'coef'): calculates the significand
dscinot(120*0.234,'exp'): calculates the exponent
dscinot(28.08): will display visually 2.808x10^1
dscinot('3.14','<i>A</i>','no'): display visually 3.14x10^A
dscinot(28.08,'B,2%'): asks the student for the number using SciNot, using tolerance 2% for the significand.
The dropdown for the exponent will not permit entering 0.2808x10^2 |
|
Notes: |
| Function Name:
|
dsum
|
| Function Syntax:
|
dsum('top','bottom') |
| Function Description:
|
('E'-type
function) prettily displays summation notation using strings top
and bottom.
|
| Parameters:
|
top and
bottom can only be a single line strings with optional super and
subscripts (i.e. it can't be a fraction).
|
| Example: |
V0 = I[2,9]
V1 = E"dsum('V0','V0 = 1')" |
|
Notes: |
| Function Name:
|
dterm
|
| Function Syntax:
|
dterm(coef,base,exp,options)
dterm(coef,base,exp)
dterm(base,exp) |
| Function Description:
|
The
function will display the term coef*base^exp. The "coef" argument
is always evaluated, and no sign is displayed when coef is
non-negative. Special cases: exp=' ',0,1; base=' ',1;
coef=0,1,-1,' '; If xB,yB or zB are in options, will put a
box for coef, base, and exponent correspondingly. |
| Parameters:
|
coef: number (or string for number)
base: string
exp : string or number
options: list of standard text options, boxes |
| Example: |
|
|
Notes: |
| Function Name:
|
edfrac
|
| Function Syntax:
|
edfrac(whole,num,den,options)
edfrac(whole,num,den)
edfrac(num,den,options)
edfrac(num,den)
edfrac(decimal,options)
edfrac(decimal) |
| Function Description:
|
The function evaluates all parameters except options, and calculates the fraction.
In the case of a decimal, the closest rational number, with denominator less than
1000 is calculated.
The fraction is formatted based on the options:
-To reduce or not (default is reduce): "eval":do reduce "none":do not reduce.
-Return type (default is mixed): "mixed": display as fraction in mixed form, or
display an integer when num=0. "mixed1": same as mixed, but display as fraction,
even if the result is an integer. "improper": display as fraction in improper form,
or as integer when den=1. "improper1": same as improper, but display as fraction,
even if the result is an integer. Remark. Those options can be abbreviated as:
"no","ev","mi","mi1","im","im1". Boxes: "xB":put the whole in box
"yB":put the den in box "zB":put the num in box Other options:
"S":keep the sign in numerator, only for improper "s":make small size
All standard text options like "i"-italic, "d"-bold, "k0-k9" color, can be applied for
all parts if alone, or for specific part, if used with prefix x,y or z.
The delimiter for the options is comma ",".
|
| Parameters:
|
whole: '-', or integer, or string to evaluate
num,den: integer or string to evaluate
decimal: decimal number or string to evaluate
options: comma delimited list of options |
| Example: |
|
|
Notes: |
| Function Name:
|
efrac
|
| Function Syntax:
|
efrac(whole,num,den,options) efrac(num,den,options) efrac(decimal, options) |
| Function Description:
|
The function evaluates all parameters except options, and calculates the fraction. In the case of a decimal, the
closest rational number, with denominator less than 1000 is calculated. The return is an integer number.
Options:
"eval"/"none": same as in edfrac
"whole": eval as mixed1 and returns the "whole" part
"num": eval as mixed1 and returns the numerator
"inum": eval as improper1 and returns the numerator
"den": eval as improper1 and returns the denominator
"real": eval as fraction and returns the result as a decimal number
"all": returns a comma separated list of "whole","num","den", and "inum".
|
| Parameters:
|
whole: '-', or integer, or string to evaluate
num,den: integer or string to evaluate
decimal: decimal number or string to evaluate
options: comma delimited list of options |
| Example: |
V5=I(efrac("1/1+1/2+1/3+1/5+1/7",'inum'))     => 457
V6=I(efrac("1/1+1/2+1/3+1/5+1/7",'den'))       => 210
V7=I(efrac("1/1+1/2+1/3+1/5+1/7",'whole'))   => 2
V8=I(efrac("1/1+1/2+1/3+1/5+1/7",'num'))      => 37
V9=R.4(efrac("1/1+1/2+1/3+1/5+1/7",'real'))   => 2.1762
V10=E'efrac("1/1+1/2+1/3+1/5+1/7")               => "2,37,210,457"
|
|
Notes: |
| Function Name:
|
empfrac
|
| Function Syntax:
|
empfrac(whole,num,den,options)
empfrac(whole,num,den)
empfrac(num,den,options)
empfrac(num,den)
empfrac(decimal,options)
empfrac(decimal) |
| Function Description:
|
The function evaluates all parameters except options, and calculates the fraction.
In the case of a decimal, the closest rational number, with denominator less than
1000 is calculated.
The fraction is formatted based on the options:
-To reduce or not (default is reduce): "eval":do reduce "none":do not reduce.
-Return type (default is mixed): "mixed": display as fraction in mixed form, or
display an integer when num=0. "mixed1": same as mixed, but display as fraction,
even if the result is an integer. "improper": display as fraction in improper form,
or as integer when den=1. "improper1": same as improper, but display as fraction,
even if the result is an integer. Remark. Those options can be abbreviated as:
"no","ev","mi","mi1","im","im1". The delimiter for the options is comma "," |
| Parameters:
|
whole: '-', or integer, or string to evaluate
num,den: integer or string to evaluate
decimal: decimal number or string to evaluate
options: comma delimited list of options |
| Example: |
|
|
Notes: |
| Function Name:
|
evalprod
|
| Function Syntax:
|
evalprod(prod_expr,lbound,ubound,varname)
|
| Function Description:
|
Calculate product using the formula:
Product_(x=1)^m  :=  f(1)*f(1+1)*....*f(m)
|
| Parameters:
|
varname: the product index (default 'x')
prod_expr: string expression for the function of "x" to evaluate
lbound: lower bound - will be evaluated as integer
ubound: upper bound - will be evaluated as real |
| Example: |
|
|
Notes: |
| Function Name:
|
evalsum
|
| Function Syntax:
|
evalsum(sum_expr,lbound,ubound,varname)
|
| Function Description:
|
Calculate sum using the formula:
Sum_(x=1)^m f(x) : = f(1)+f(1+1)+....+f(m)
|
| Parameters:
|
varname: the product index (default 'x')
sum_expr: string expression for the function of "x" to evaluate
lbound: lower bound - will be evaluated as integer
ubound: upper bound - will be evaluated as real |
| Example: |
|
|
Notes: |
| Function Name:
|
exp
|
| Function Syntax:
|
exp(x)
|
| Function Description:
|
ex.
|
| Parameters:
|
x is any
real on integer number. |
| Example: |
V0 =
R.1[2.2,6.7]
V1 = R.5(exp(V0)) |
|
Notes: |
| Function Name:
|
factorial
|
| Function Syntax:
|
factorial(x) |
| Function Description:
|
x!, x>=0; -1 otherwise. |
| Parameters:
|
x: positive
integer. |
| Example: |
V0 = I[2,6]
V1 = I(factorial(V0)) |
|
Notes: |
| Function Name:
|
factorsof
|
| Function Syntax:
|
factorsof(x,pre_char) |
| Function Description:
|
('E'-type
function) returns comma separated list of factors of
integer x with optional prefix string (except for first!).
|
| Parameters:
|
x: integer
value
pre_char: string |
| Example: |
V0 = I[6,50]
V1 = I(V0*2)
V2 = E"factorsof(V1,' ',', and ')"
So If V0 = 6 then we have:
1, 2, 3, 4, 6, and 12
|
|
Notes: |
| Function Name:
|
fdist
|
| Function Syntax:
|
fdist(x,y,a)
|
| Function Description:
|
Returns values of the F-distribution where x
= degrees of freedom for numerator and y =
degrees of freedom for denominator.
|
| Parameters:
|
x is an
integer between 1 and 10,
y is an integer between 1 and 10,
and a =
{0.010, 0.025, 0.050}.
|
| Example: |
V0 = R*.2[2,50]
V1 = I[1,10]
V2 = I[1,10]
V3 = L[0.050,0.025,0.010]
V4 = R*.2(fdist(V1,V2,V3)) |
|
Notes: |
| Function Name:
|
fdistinv
|
| Function Syntax:
|
fdistinv(p,q,b) |
| Function Description:
|
Returns values of the F-distribution where
p = degrees or freedom for the numerator and q
= degrees of freedom for the denominator.
|
| Parameters:
|
b is real
greater than zero,
p is an integer between 1 and 30,
q is an integer between 1 and 30.
|
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
floor
|
| Function Syntax:
|
floor(x) |
| Function Description:
|
The greatest integer smaller than x.
|
| Parameters:
|
x: any real
or integer number. |
| Example: |
V0 = I[1,9,2]
V1 = I[2,10,2]
V2 = R.3(V0/V1)
V3 = I(floor(V2)) |
|
Notes: |
| Function Name:
|
gamma
|
| Function Syntax:
|
gamma(z) |
| Function Description:
|
Euler
Gamma Function
for integers: gamma(n+1)=n!. |
| Parameters:
|
z real, z !=
0,-1,-2,... |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
gcd
|
| Function Syntax:
|
gcd(x,y) |
| Function Description:
|
Greatest common divisor of integers x and y.
|
| Parameters:
|
x: an
integer,
y: an integer. |
| Example: |
V0 =
I(gcd(12,3)) |
|
Notes: |
| Function Name:
|
getfactor
|
| Function Syntax:
|
getfactor(x,p) |
| Function Description:
|
Returns positive integer at position p in list of factorsof(x,'') [1st
number in list is at position 1].
|
| Parameters:
|
x: integer
values
p: position |
| Example: |
V0 = I[6,100]
V1 = E"getfactor(V0,1)" |
|
Notes: |
| Function Name:
|
getnum
|
| Function Syntax:
|
getnum('s',t) |
| Function Description:
|
Orders a string of numbers from smallest to largest (integers only!).
|
| Parameters:
|
s is a
string of numbers (comma separated),
t is the place (between 1 and x) that you want back.
|
| Example: |
V1 =
I[-9,9:-1,0,1,2]
V2 = I[-9,9:V1,-1,0,1,2]
V3 = I[-9,20:V1,V2,-1,0,1,2]
V4 = I(getnum('0,1,2,V1,V2,V3',6))
|
|
Notes: |
| Function Name:
|
getrank
|
| Function Syntax:
|
getrank(y) |
| Function Description:
|
List of ranks for a list;
returns :list of the orders of the numbers.
|
| Parameters:
|
y: list of
comma separated numbers. |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
getsigfig
|
| Function Syntax:
|
getsigfig(str) |
| Function Description:
|
Returns the number of significant figures in the number in "str".
|
| Parameters:
|
str: String representing a number |
| Example: |
getsigfig(100)=1
getsigfig("100")=1
getsigfig(100.0)=1
getsigfig("100.0")=4 |
|
Notes: |
| Function Name:
|
isqr
|
| Function Syntax:
|
isqr(x)
|
| Function Description:
|
Returns the product of all of the square factors of integer x.
|
| Parameters:
|
x: an
integer. |
| Example: |
V0 = I[2,30]
V1 = I(isqr(V0)) |
|
Notes: |
| Function Name:
|
lcm
|
| Function Syntax:
|
lcm(x,y) |
| Function Description:
|
Least common multiple of x and y.
|
| Parameters:
|
x: an
integer,
y: an integer. |
| Example: |
V0 = I[1,10]
V1 = I(V1+1)
V2 = I[2,9:V2,V2/V1,V3]
V3 = I(lcm(V1,V2)) |
|
Notes: |
| Function Name:
|
log
|
| Function Syntax:
|
log(x)
|
| Function Description:
|
Natural log of x (i.e ln(x)), x>0.
|
| Parameters:
|
x: any
integer or real number greater than 0.
|
| Example: |
V0 =
R*.1[2.3,5.8]
V1 = R.8(log(V0)) |
|
Notes: |
| Function Name:
|
lowercase
|
| Function Syntax:
|
lowercase('str') |
| Function Description:
|
('E'-type
function) returns the string 'str' in all lowercase
characters. |
| Parameters:
|
str: a
string. |
| Example: |
V0 =
L[Rowing,Bowling,Curling]
V1 = E"lowercase('V0')" |
|
Notes: |
| Function Name:
|
max
|
| Function Syntax:
|
max(x,y) |
| Function Description:
|
The maximum of x and y. |
| Parameters:
|
x: any
integer or real number,
y: any integer or real number. |
| Example: |
V0 = I[-5,-2]
V1 = I[2,5]
V2 = I(max(V0,V1)) |
|
Notes: |
| Function Name:
|
mean
|
| Function Syntax:
|
mean(s)
|
| Function Description:
|
Mean of the sample data. |
| Parameters:
|
s: list of
comma separated numbers. |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
median
|
| Function Syntax:
|
median(s) |
| Function Description:
|
Median of the sample data. |
| Parameters:
|
s: list of
comma separated numbers. |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
min
|
| Function Syntax:
|
min(x,y) |
| Function Description:
|
The minimum of x and y. |
| Parameters:
|
x: any
integer or real number,
y: any integer or real number. |
| Example: |
V0 = I[-5,-2]
V1 = I[2,5]
V2 = I(min(V0,V1)) |
|
Notes: |
| Function Name:
|
mkgraph
|
| Function Syntax:
|
mkgraph(width,height,functions,xmin,xmax,ymin,ymax,par1,par2,...)
|
| Function Description:
|
('E'-type function) This function is used to create a graph or a plot. The result will be rendered as
a java applet. |
| Parameters:
|
width(numeric): The applet's width in pixels
height(numeric): The applet's height in pixels
xmin,xmax(numeric): The range of values for the x-axis
ymin,ymax(numeric): The range of values for the y-axis
functions(string): A functional expression of the variable x to be plotted, or a semicolon separated list of such expressions.
See optional parameter Functions for more details.
Examples:
       3x^2-4x+2
       x^2;x^3;x^4;x^5
par1,par2,...(strings): Optional parameters
Syntax:
       "name=value" or
       "name=value1;value2;..."
Examples:
        scale=auto
        colors=0000ff;ff0000;00ff00;ffcc00
        linestyle=0;0;2;1
For complete details, see the
full function definition |
| Example: |
|
|
Notes: |
| Function Name:
|
mktable
|
| Function Syntax:
|
mktable(cell_list,rows,cols,border)
mktable(cell_list,rows,cols,parameters)
|
| Function Description:
|
Returns a table. |
| Parameters:
|
cell_list - comma separated list of all cells
rows, cols - number of rows and columns
border - a number for the border or
parameters - a string with parameters for the table tag |
| Example: |
V1=E"mktable('11,12,21,22',2,2)"
     display a table with 2 rows and 2 columns.
V1=E"mktable('11,12,21,22',2,2, 'style=\"border:solid 1px black\"')"
     same table, surrounded by 1px black border
V1=E"mktable('11,12,21,22',2,2,1)"
     same table with all borders shown |
|
Notes: |
| Function Name:
|
moment
|
| Function Syntax:
|
moment(list,K) |
| Function Description:
|
The function will return the sum of K-th powers of elements |
| Parameters:
|
list: a list of numbers
K: power for the numbers |
| Example: |
|
|
Notes: |
| Function Name:
|
mpfrac (see dfrac)
|
| Function Syntax:
|
mpfrac(whole,num,den,'options')
mpfrac(num,den) |
| Function Description:
|
The function will display in the MathPallette the fraction whole num/den.
No evaluate.
Special cases: whole=0,' '; num<0 |
| Parameters:
|
whole,num,den: strings |
| Example: |
|
|
Notes: |
| Function Name:
|
mplg
|
| Function Syntax:
|
mplg(item1,item2,...) |
| Function Description:
|
The function always displays the first item. When checking the user answer, all items will be tested one after another.
Could be properly nested. |
| Parameters:
|
item1,item2:MathPallette strings |
| Example: |
|
|
Notes: |
| Function Name:
|
mpnlg
|
| Function Syntax:
|
mpnlg(name,item1,item2,...) |
| Function Description:
|
The function always displays the first item. When checking the user answer, all first items of the list
groups with the same name will be tested. Next, all second items of all list groups with the same name
will be tested, and so on.
All list groups with the same name should have the same number of items. (If not, the items in the shorter
selections will restart.)
Could be properly nested. |
| Parameters:
|
name:lowercase letter 'a' - 'z'
item1,item2:MathPallette strings |
| Example: |
|
|
Notes: |
| Function Name:
|
mprad
|
| Function Syntax:
|
mprad(coef,rad,idx)
mpterm(rad,idx) |
| Function Description:
|
The function will display in the MathPallette the radical coef*(rad)^(1/idx).
No evaluate.
Special cases: coef=-1,1; idx=2 |
| Parameters:
|
coef, rad, idx: strings |
| Example: |
|
|
Notes: |
| Function Name:
|
mpterm
|
| Function Syntax:
|
mpterm(coef,base,exp)
mpterm(base,exp) |
| Function Description:
|
The function will display in the MathPallette the term coef*base^exp. The "coef" argument is always
evaluated, and no sign is displayed when the value of "coef" is non-negative.
Special cases: exp=' ',0,1; base=' ',1; coef=0,1,-1,' ' |
| Parameters:
|
coef: number (or string for number)
base: string
exp: string or number |
| Example: |
|
|
Notes: |
| Function Name:
|
mpul
|
| Function Syntax:
|
mpul(delm,arg1,arg2,...) |
| Function Description:
|
The function will display the list delimited by delm. When checking the user answer, all possible
permutations will be tested.
Could be properly nested. |
| Parameters:
|
delm: delimiter for the list (could be comma, or '+', or $times$)
arg1,ar2:MathPallette strings (objects) |
| Example: |
Example 1:
To test for all possible expressions representing
V1x^2+V2x+V3, use
V4=E"mpterm('V1','x',2)",
V5=E"mpterm('V2','x',1)",
V6=E"mpterm('V3','x',0)",
V7=E"mpul('+','V4','V5','V6')"
or directly simply
V7=E"mpul('+',mpterm('V1','x',2),mpterm('V2','x',1),mpterm('V3','x',0))"
Warning:  In the last expression, there are no quotes for the mpterm's in the mpul, while if assigned to variables,
the quotes should stay.
Example 2:
To make all products for (x+3) (y+4), use
V1=E"mpul('+','x','3')" //first factor
V2=E"mpul('+','y','4')" //second factor
V3=E"mpul(' ','(V1)','(V2)')" //the product |
|
Notes: |
| Function Name:
|
mpvar
|
| Function Syntax:
|
mpvar(names,list)
mpvar(names,a,b)
mpvar(names,a,b,n) |
| Function Description:
|
In the first form (only "names"), 10 random values from [-10,10] are created for each variable. The second
should be used with only one name because all defined variables in "names" shared the list. In the other two
cases, 10 (or "n") random values from [a,b] are created for each variable. |
| Parameters:
|
"names": name for variable, or comma separated list of names
"a","b": interval [a,b] for all listed variables
"n": number of points to test in the interval [a,b]
"list": comma separated list of values for the variable |
| Example: |
Start with:
V22=E"mpvar('x')"
V23=E"mpvar('y')"
and in AnswerPallette "Eval" box you can use:
"V22 V23 sin(x+y)-cos(x-y)" |
Notes:
If the evaluated functions are normal, (for example, they are defined everywhere) use the first format.
If one has "sqrt(x)", use mpvar('x',1,10). If the domain is [-10,-1]U[1,10], one can use function "randomlist"
to create a list with random values in the domain:
V11=E"randomlist(5,-10,-1,7,true)"
V12=E"randomlist(5,1,10,7,true)"
V13=E"mkvar('x','V11,V12')"
is perfect for testing functions like:
(x^2-1)^(1/2)*(100-x^2)^(1/2)*|x| |
| Function Name:
|
nospace
|
| Function Syntax:
|
nospace('str') |
| Function Description:
|
('E'-type
function) use to remove unwanted spaces in 'str' where 'str'
is a string. |
| Parameters:
|
str: a
string. |
| Example: |
V1 = I[5,8]
V2 = I[2,9:V3,V1]
V3 = I[1,4]
V4 = I(V1*10+V2)
V5 = E"nospace('0.V3V4V4')" |
|
Notes: |
| Function Name:
|
overline
|
| Function Syntax:
|
overline('str') |
| Function Description:
|
('E'-type
function) displays string 'str' with a horizontal line
over it. |
| Parameters:
|
str: a
string. |
| Example: |
V0 =
I[-5,15,3:1]
V1 = E"overline('V0')" |
|
Notes: |
| Function Name:
|
pow
|
| Function Syntax:
|
pow(x,y) |
| Function Description:
|
xy.
|
| Parameters:
|
x: any
integer or real number,
y: any integer or real number. |
| Example: |
V0 =
R*.1[5.5,7.9:6.0,7.0]
V0 = I(pow(10,V0)) |
|
Notes: |
| Function Name:
|
randomlist
|
| Function Syntax:
|
randomlist(num,low,high,ndec,uniq)
randomlist(num,low,high,ndec)
randomlist(num) |
| Function Description:
|
Returns a list of random numbers.
In the second format, just returns the list "0,1,2,...,num". |
| Parameters:
|
num: how many numbers we want in the list
[low,high]: the range for the numbers
ndec: number of decimal places
uniq: if missing or "no", the numbers can be repeated. If using "yes", make sure there are enough numbers in the range.
|
| Example: |
V1=E"randomlist(20,1,20,0,true)"
    will return a random permutation of 1..20.
V2=E"randomlist(20,1,20,0)"
    will return 20 integer numbers from 1..20,
    most likely some repeating
|
|
Notes: |
| Function Name:
|
rankcorr
|
| Function Syntax:
|
rankcorr(y1,y2) |
| Function Description:
|
Rank Correlation Coefficient. |
| Parameters:
|
y1, y2:
lists of comma separated numbers (same length).
|
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
round
|
| Function Syntax:
|
round(x) |
| Function Description:
|
The integer closest to x. |
| Parameters:
|
x: any
integer or real number. |
| Example: |
V0 =
R.1[5.5,9.5]
V1 = I(pow(10,V0))
V2 = I(round(V1/1000)) |
|
Notes: |
| Function Name:
|
sdv
|
| Function Syntax:
|
sdv(s)
|
| Function Description:
|
Variance of the sample data. |
| Parameters:
|
s: list of
comma separated numbers. |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
sigfig
|
| Function Syntax:
|
sigfig(num,dig,method)
sigfig(num,dig)
|
| Function Description:
|
Display a number with given significant figures. The value returned will be a string representing the number "num" with "dig" significant features. |
| Parameters:
|
num: Number of string representing number
dig: desired number of significant features, with optional '-' sign to force integer numbers as integers
(no exponential notation).
method: Optional. Select rounding method. Default value 1.
   method=3,0,1,2 means rounding toward -inf,inf,0,away from 0, even number,+inf |
| Examples: |
sigfig(300,2) = "3.0E2"
sigfig(300,-2) = "300"
sigfig(3.1425,4) = "3.143"
sigfig(3.1425,4,0) = "3.142"
|
|
Notes: |
| Function Name:
|
simpson
|
| Function Syntax:
|
simpson(int_expr,lbound,ubound,stopval)
|
| Function Description:
|
Approximate definite integral using the formula:
integral of f from a to b ~=
( (b-a)/3n) [f(x_0)   +   4f(x_1)   +   2f(x_2)   +  ....  +   4f(x_n-1)   +   f(x_n)]
where x_i=a+i*(b-a)/n
|
| Parameters:
|
int_expr:string expression for the function of "x" to approximate
lbound/ubound: upper/lower bounds - will be evaluated as reals
stopval: if even positive integer: the fixed number of points
     :if positive and less than 2:  expected accuracy to acheive
     :if negative integer, number of correct digits to acheive |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
sin
|
| Function Syntax:
|
sin(x)
|
| Function Description:
|
The sine of x. |
| Parameters:
|
x: an angle
in radians. |
| Example: |
V0 =
R.1[-5.2,5.2:0]
V1 = R.5(sin(V0)) |
|
Notes: |
| Function Name:
|
snd
|
| Function Syntax:
|
snd(z)
|
| Function Description:
|
Standard normal distribution; returns the area under the standard
normal curve from 0 to the specified value of z.
|
| Parameters:
|
z: any
number greater or equal to 0. |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
sndinv
|
| Function Syntax:
|
sndinv(y) |
| Function Description:
|
Critical value for area of standard normal distribution
y=snd(z) <=> z=sndinv(y).
|
| Parameters:
|
y: real, 0
< y < 0.5. |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
sqrt
|
| Function Syntax:
|
sqrt(x)
|
| Function Description:
|
The square root of x, x > 0.
|
| Parameters:
|
x: any
number greater or equal to 0. |
| Example: |
V0 =
R.1[0.2,5.2]
V1 = R.5(sqrt(V0)) |
|
Notes: |
| Function Name:
|
ssd
|
| Function Syntax:
|
ssd(s)
|
| Function Description:
|
Standard deviation of the sample data.
|
| Parameters:
|
s: list of
comma separated numbers. |
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
stack
|
| Function Syntax:
|
stack('top','bot') |
| Function Description:
|
('E'-type
function) stacks top above bottom
where top and bottom are simple
strings (i.e. contain no M-type variables).
|
| Parameters:
|
top: simple
string,
bottom: simple string. |
| Example: |
V0 =
E"stack('Part filled','by pump A')" or
V1 = E"stack('1','2')" |
|
Notes: |
| Function Name:
|
stdest
|
| Function Syntax:
|
stdest(y1,y2) |
| Function Description:
|
Standard Error Estimate for two lists
returns : Sqrt(Sum (y1_i-y2_i)^2 / (n-2) ).
|
| Parameters:
|
y1, y2:
lists of comma separated numbers (same length).
|
| Example: |
UPDATING
|
|
Notes: |
| Function Name:
|
tan
|
| Function Syntax:
|
tan(x)
|
| Function Description:
|
The tangent of x. |
| Parameters:
|
x: an
integer or real number. |
| Example: |
V0 =
R.1[-5.5,5.5:0]
V1 = R.5(tan(V0)) |
|
Notes: |
| Function Name:
|
tdist
|
| Function Syntax:
|
tdist(type,x,df) |
| Function Description:
|
Returns student's t-distribution values;
|
| Parameters:
|
'm' is a
string that selects the type of test; set m='c' for confidence
level testing, m='a1' for one-tailed level of significance testing, or
m='a2'
for two-tailed level of significance testing
Allowable values:
c={0.75, 0.8, 0.85, 0.9, 0.95, 0.98, 0.99}
a1={0.125, 0.1, 0.075, 0.05, 0.025, 0.01, 0.005}
a2={0.25, 0.2,
0.15, 0.1, 0.05, 0.02, 0.01}. |
| Example: |
V0 =
L[0.125,0.100,0.075,0.050,0.025,0.010,0.005]
V1 = I[3,32]
V2 = I(V1-2)
V3 = R*.3(tdist('a1',V0,V2)) |
|
Notes: |
| Function Name:
|
term
|
| Function Syntax:
|
term('x','y') |
| Function Description:
|
('E'-type
function) term creator:
x evaluates to a real or an integer
Let v be the value x evaluates
to. This function returns a string z where:
| z="y" |
if v=1 & y!="" |
|
z="1" |
if v=1 & y="" |
|
|
| z="-y" |
if v=-1 & y!="" |
|
z="-1" |
if v=-1 & y="" |
|
|
| z="" |
if v=0 |
|
z="vy" |
if v>0 & v!=0 |
|
|
| Parameters:
|
x: a string,
y: a string. |
| Example: |
V0 =
S"<i>k</i>"
V1 = I[1,20]
V2 = E"term('V1','V0')" |
|
Notes: |
|
|
|