© Andrey A. Meshkov "AL-CHEMIST", 2000-3000.
All rights reserved.
Free for any use.
No warranty of any kind.
#1 Convert input string to rpn array
#2 Convert rpn array to executable code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fuchsia-colored functions have an implementation with integer parameters.
For such functions, there are both
double func (double x1, double x2, …, double xn) and
double func (integer x1, integer x2, …, integer xn)
Green-colored functions accept only integer parameters.
Description of the functions that have only the FPU implementation contains the #FPU tag.
Third column = argument count [:result count]
Functions with integer result : ‹result count› = i
Functions with pointer result : ‹result count› = p
Default value of ‹result count› is 1
Functions with a variable number of arguments:
• argument count < 0
• ABS (argument count) = minimum argument count
Assembler instructions | ||||||||||||||||||||||||||||||||||||||||
int3 | 0:0 |
Breakpoint |
int3 | |||||||||||||||||||||||||||||||||||||
int.3 | 0:0 |
Breakpoint |
int 3 | |||||||||||||||||||||||||||||||||||||
finit | 0:0 |
Initialize FPU after checking for pending unmasked floating-point exceptions
SSE
|
finit |
|||||||||||||||||||||||||||||||||||||
fninit | 0:0 |
Initialize FPU without checking for pending unmasked floating-point exceptions
SSE
|
fninit |
|||||||||||||||||||||||||||||||||||||
fclex | 0:0 |
Clear floating-point exception flags after checking for pending unmasked floating-point exceptions
SSE
|
fclex |
|||||||||||||||||||||||||||||||||||||
fnclex | 0:0 |
Clear floating-point exception flags without checking for pending unmasked floating-point exceptions
SSE
|
fnclex |
|||||||||||||||||||||||||||||||||||||
FPU functions | ||||||||||||||||||||||||||||||||||||||||
fstsw |
1:0 |
Store FPU status word to integer variable after checking for pending unmasked floating-point exceptions
SSE
|
fstsw(x) x - integer variable
|
|||||||||||||||||||||||||||||||||||||
fnstsw |
1:0 |
Store FPU status word to integer variable without checking for pending unmasked floating-point exceptions
SSE
|
fnstsw(x) x - integer variable
|
|||||||||||||||||||||||||||||||||||||
fstef |
1:0 |
Store FPU exception flags to integer variable after checking for pending unmasked floating-point exceptions
SSE
|
fstef(x) x - integer variable
|
|||||||||||||||||||||||||||||||||||||
fnstef |
1:0 |
Store FPU exception flags to integer variable without checking for pending unmasked floating-point exceptions
SSE
|
fnstef(x) x - integer variable
|
|||||||||||||||||||||||||||||||||||||
fstcw |
1:0 |
Store FPU control word to integer variable after checking for pending unmasked floating-point exceptions
SSE
|
fstcw(x) x - integer variable
|
|||||||||||||||||||||||||||||||||||||
fnstcw |
1:0 |
Store FPU control word to integer variable without checking for pending unmasked floating-point exceptions
SSE
|
fnstcw(x) x - integer variable
|
|||||||||||||||||||||||||||||||||||||
fldcw |
1:0 |
Load FPU control word from integer variable or constant
SSE
|
fldcw(x)
|
|||||||||||||||||||||||||||||||||||||
fmaske |
1:0 |
Mask FPU exceptions after checking for pending unmasked floating-point exceptions
SSE
|
fmaske(x)
|
|||||||||||||||||||||||||||||||||||||
fnmaske |
1:0 |
Mask FPU exceptions without checking for pending unmasked floating-point exceptions
SSE
|
fnmaske(x)
|
|||||||||||||||||||||||||||||||||||||
Variable declaration | ||||||||||||||||||||||||||||||||||||||||
You can use ` (grave accent) prefix symbol while declaring variables.
var `x=888; // create variable named x in runtime table
Use # prefix symbol to prefer global variables
|
||||||||||||||||||||||||||||||||||||||||
var float double |
Double variable declaration. 64-bit float |
|
||||||||||||||||||||||||||||||||||||||
cvar complex |
Complex variable declaration. 2 × 64-bit float |
|
||||||||||||||||||||||||||||||||||||||
int integer |
Native integer variable declaration. x32 : 4-byte integer x64 : 8-byte integer |
|
||||||||||||||||||||||||||||||||||||||
str string |
String variable declaration. Address of an array of single-byte characters
♦ |
|
||||||||||||||||||||||||||||||||||||||
absolute |
:: |
Declare a variable that resides at the same address as another variable |
x::y absolute(x,y) x absolute y
y - variable or pointer constant
|
|||||||||||||||||||||||||||||||||||||
System functions | ||||||||||||||||||||||||||||||||||||||||
addr |
&x |
1:p 2:p |
Address of the variable |
&x addr(x)
|
||||||||||||||||||||||||||||||||||||
saddr |
&&x |
1:p |
Address of the string array |
&&x saddr(x)
x - string variable or constant
|
||||||||||||||||||||||||||||||||||||
assign |
-2:0 |
Assign the address of the variable. Assign function uses the address of the variable it had at compile time |
assign x,y assign(x,y)
x - destination variable
|
|||||||||||||||||||||||||||||||||||||
reassign |
-1:0 |
Restore initial address of the variable |
reassign x reassign(x)
x - variable
|
|||||||||||||||||||||||||||||||||||||
vfloat vdouble |
1 | Address as double variable |
vfloat(p) vdouble(p)
p - pointer or integer constant
|
|||||||||||||||||||||||||||||||||||||
vcomplex |
1 | Address as complex variable |
vcomplex(p)
p - pointer or integer constant
|
|||||||||||||||||||||||||||||||||||||
vint vinteger |
1 | Address as integer variable |
vint(p) vinteger(p)
p - pointer or integer constant
|
|||||||||||||||||||||||||||||||||||||
vstr vstring |
1 | Address as string variable |
vstr(p) vstring(p)
p - pointer or integer constant
|
|||||||||||||||||||||||||||||||||||||
pfloat pdouble |
*p p^ |
1 | Double indirection operator |
*p p^ pfloat(p) pdouble(p)
p - integer variable or constant
|
||||||||||||||||||||||||||||||||||||
pcomplex |
**p p^^ |
1:2 | Complex indirection operator |
**p p^^ pcomplex(p)
p - integer variable or constant
|
||||||||||||||||||||||||||||||||||||
pint pinteger |
1:i | Native integer indirection operator |
pint(p) pinteger(p)
p - integer variable or constant
|
|||||||||||||||||||||||||||||||||||||
pstr pstring |
1:i | String indirection operator |
pstr(p) pstring(p)
p - integer variable or constant
|
|||||||||||||||||||||||||||||||||||||
pint64 |
1 | Int64 indirection operator |
pint64(p)
p - integer variable or constant |
|||||||||||||||||||||||||||||||||||||
:float :double |
1 | Double type modifier |
x:float x:double |
|||||||||||||||||||||||||||||||||||||
:int |
1 | Native integer type modifier |
x:int |
|||||||||||||||||||||||||||||||||||||
:int64 |
1 | Int64 type modifier |
x:int64 |
|||||||||||||||||||||||||||||||||||||
tcarg |
1 |
Complex argument typecast for external procedure Postfix notation not allowed. |
|
|||||||||||||||||||||||||||||||||||||
covalue |
x` |
1 |
The value of the variable it had at compile time |
covalue(x) x`
|
||||||||||||||||||||||||||||||||||||
restore |
1 |
Copy covalue to the variable Return new value of the variable |
restore(x) x - variable
|
|||||||||||||||||||||||||||||||||||||
reset |
1:0 |
Copy covalue to the variable Return void |
reset(x) x - variable
|
|||||||||||||||||||||||||||||||||||||
is.x32 |
0:i |
Is x32 DLL? |
returns: 1 ⇐ DLL is x32 0 ⇐ DLL is not x32 |
|||||||||||||||||||||||||||||||||||||
is.n32 |
0:i |
Is not x32 DLL? |
returns: 1 ⇐ DLL is not x32 0 ⇐ DLL is x32 |
|||||||||||||||||||||||||||||||||||||
is.x64 |
0:i |
Is x64 DLL? |
returns: 1 ⇐ DLL is x64 0 ⇐ DLL is not x64 |
|||||||||||||||||||||||||||||||||||||
is.n64 |
0:i |
Is not x64 DLL? |
returns: 1 ⇐ DLL is not x64 0 ⇐ DLL is x64 |
|||||||||||||||||||||||||||||||||||||
dll.bits |
0:i |
DLL bitness |
returns: 32 ⇐ DLL is x32 64 ⇐ DLL is x64 |
|||||||||||||||||||||||||||||||||||||
sizeof |
1:i |
Size of object in bytes |
sizeof(x)
x - constant, variable or
|
|||||||||||||||||||||||||||||||||||||
is.nan |
1:i |
Returns whether x is a NaN (Not-A-Number) value |
is.nan(x) ♦ 1 ⇐ x is a NaN value ♦ 0 ⇐ otherwise |
|||||||||||||||||||||||||||||||||||||
is.inf |
1:i |
Returns whether x is an infinity value (either positive infinity or negative infinity) |
is.inf(x) ♦ 1 ⇐ x is an infinity value ♦ 0 ⇐ otherwise |
|||||||||||||||||||||||||||||||||||||
is.valid |
1:i |
Returns whether x is a valid value. A valid value is any floating-point value that is neither infinite nor NaN (Not-A-Number) |
is.valid(x) ♦ 1 ⇐ x is a valid value ♦ 0 ⇐ otherwise |
|||||||||||||||||||||||||||||||||||||
is.invalid |
1:i |
Returns whether x is an invalid value. An invalid value is any floating-point value that is either infinite or NaN (Not-A-Number) |
is.invalid(x) ♦ 1 ⇐ x is an invalid value ♦ 0 ⇐ otherwise |
|||||||||||||||||||||||||||||||||||||
Return functions | ||||||||||||||||||||||||||||||||||||||||
result.set |
=x :=x |
1 |
Assign the default result value.
Required active compiler options: |
result.set(x) =x :=x
|
||||||||||||||||||||||||||||||||||||
result.get |
(=) == |
0 |
Get the default result value.
Required active compiler options: |
result.get
|
||||||||||||||||||||||||||||||||||||
co.rcopy co.rxcopy |
x= x:= |
1 |
Copy the default result value to the variable x.
Required active compiler options: |
co.rcopy(x) co.rxcopy(x) x= x:=
x - variable
|
||||||||||||||||||||||||||||||||||||
exit quit |
0:0 |
Quit the function.
Required active compiler options: |
exit; quit;
|
|||||||||||||||||||||||||||||||||||||
exit.if quit.if *.if.true |
1:0 |
Quit the function.
Required active compiler options: |
exit.if(c); quit.if(c);
exit.if.true(c); c - integer value Quit the function if c≠0
|
|||||||||||||||||||||||||||||||||||||
exit.if.not quit.if.not *.if.false |
1:0 |
Quit the function.
Required active compiler options: |
exit.if.not(c); quit.if.not(c);
exit.if.false(c); c - integer value Quit the function if c=0
|
|||||||||||||||||||||||||||||||||||||
return |
0:0 1:0 |
Assign the result value if defined and quit the function.
Required active compiler options: |
return; return(x);
|
|||||||||||||||||||||||||||||||||||||
return.if return.if.true |
1:0 2:0 |
Assign the result value if defined and quit the function.
Required active compiler options: |
return.if(c); return.if(x,c);
return.if.true(c); c - integer value Quit the function if c≠0
|
|||||||||||||||||||||||||||||||||||||
return.if.not return.if.false |
1:0 2:0 |
Assign the result value if defined and quit the function.
Required active compiler options: |
return.if.not(c); return.if.not(x,c);
return.if.false(c); c - integer value Quit the function if c=0
|
|||||||||||||||||||||||||||||||||||||
Copy functions | ||||||||||||||||||||||||||||||||||||||||
copy xcopy |
= := |
2 |
Copy the value of y to the variable x. Returns new value of x |
copy(*x,y) xcopy(*x,y) x = y x := y
x - variable |
||||||||||||||||||||||||||||||||||||
copy.int xcopy.int |
[=] [:=] |
2 |
Copy the value of int(y) to the variable x. Returns new value of x
Accept double or integer values |
copy.int(*x,y) xcopy.int(*x,y) x [=] y x [:=] y
x - variable
|
||||||||||||||||||||||||||||||||||||
copy.frac xcopy.frac |
{=} {:=} |
2 |
Copy the value of frac(y) to the variable x. Returns new value of x
Accept double or integer values |
copy.frac(*x,y) xcopy.frac(*x,y) x {=} y x {:=} y
x - variable
|
||||||||||||||||||||||||||||||||||||
copy.round xcopy.round |
<=> <:=> |
2 |
Copy the value of round(y) to the variable x. Returns new value of x
Accept double or integer values |
copy.round(*x,y) xcopy.round(*x,y) x <=> y x <:=> y
x - variable
|
||||||||||||||||||||||||||||||||||||
copx ycopx |
=: |
2 |
Copy x to y. Returns new value of y |
copx(x,*y) ycopx(x,*y) x =: y
x - variable or constant |
||||||||||||||||||||||||||||||||||||
copx.int ycopx.int |
[=:] |
2 |
Copy int(x) to y. Returns new value of y
Accept double or integer values |
copx.int(x,*y) ycopx.int(x,*y) x [=:] y
x - variable or constant
|
||||||||||||||||||||||||||||||||||||
copx.frac ycopx.frac |
{=:} |
2 |
Copy frac(x) to y. Returns new value of y
Accept double or integer values |
copx.frac(x,*y) ycopx.frac(x,*y) x {=:} y
x - variable or constant
|
||||||||||||||||||||||||||||||||||||
copx.round ycopx.round |
<=:> |
2 |
Copy round(x) to y. Returns new value of y
Accept double or integer values |
copx.round(x,*y) ycopx.round(x,*y) x <=:> y
x - variable or constant
|
||||||||||||||||||||||||||||||||||||
pcopy pxcopy |
*:= |
2 |
Indirect copy function. Copy the value of y to px. Returns the value of y |
pcopy(*px,y) pxcopy(*px,y) px *:= y
px - integer variable
y - value
|
||||||||||||||||||||||||||||||||||||
pcopx pycopx |
=:* |
2 |
Indirect copy function. Copy x to py. Returns the value of x |
pcopx(x,*py) pycopx(x,*py) x =:* py
x - variable or constant
py - integer variable
|
||||||||||||||||||||||||||||||||||||
x2copy |
4 |
Copy the value of the yi to the variable xi Returns new value of x1
All variables and values must be of the same type. |
x2copy(*x1,*x2, y1,y2)
|
|||||||||||||||||||||||||||||||||||||
x3copy |
6 |
Copy the value of the yi to the variable xi Returns new value of x1
All variables and values must be of the same type. |
x3copy(*x1,*x2,*x3, y1,y2,y3)
|
|||||||||||||||||||||||||||||||||||||
x4copy |
8 |
Copy the value of the yi to the variable xi Returns new value of x1
All variables and values must be of the same type. |
x4copy(*x1,*x2,*x3,*x4, y1,y2,y3,y4)
|
|||||||||||||||||||||||||||||||||||||
vcopy vxcopy |
-2 |
Copy the value of the variable y to the variables xi
All variables must be of the same type.
Argument filters varg(…) not allowed. |
vcopy(*x1,*x2,…,*xn, *y)
vcopy(x1,y) ≡ copy(x1,y)
|
|||||||||||||||||||||||||||||||||||||
vcopx vycopx |
-2 |
Copy the value of the variable x to the variables yi
All variables must be of the same type.
Argument filters varg(…) not allowed. |
vcopx(*x, *y1,*y2,…,*yn)
vcopx(x,y1) ≡ copx(x,y1)
|
|||||||||||||||||||||||||||||||||||||
Swap functions | ||||||||||||||||||||||||||||||||||||||||
swap |
:=: |
2 |
Swap the values of the variables x and y. Returns new value of x |
swap(*x,*y) x :=: y
x - variable
|
||||||||||||||||||||||||||||||||||||
swap.int |
[:=:] |
2 |
Swap the int values of the variables x and y. Returns new value of x
Accept double or integer values |
swap.int(*x,*y) x [:=:] y
x - variable
x' = int(x)
|
||||||||||||||||||||||||||||||||||||
swap.frac |
{:=:} |
2 |
Swap the frac values of the variables x and y. Returns new value of x
Accept double or integer values |
swap.frac(*x,*y) x {:=:} y
x - variable
x' = frac(x)
|
||||||||||||||||||||||||||||||||||||
swap.round |
<:=:> |
2 |
Swap the round values of the variables x and y. Returns new value of x
Accept double or integer values |
swap.round(*x,*y) x <:=:> y
x - variable
x' = round(x)
|
||||||||||||||||||||||||||||||||||||
swapr |
-2 |
Swap the values of the variables. Shift right. Returns new value of x1
All variables must be of the same type.
Argument filters varg(…) not allowed. |
swapr(*x1,*x2,…,*xn) ♦ x1 → x2 x2 → x3 ... xn-1 → xn xn → x1 swapr(x1,x2) ≡ swap(x1,x2)
|
|||||||||||||||||||||||||||||||||||||
swapl |
-2 |
Swap the values of the variables. Shift left. Returns new value of x1
All variables must be of the same type.
Argument filters varg(…) not allowed. |
swapl(*x1,*x2,…,*xn) ♦ x1 ← x2 x2 ← x3 ... xn-1 ← xn xn ← x1 swapl(x1,x2) ≡ swap(x1,x2)
|
|||||||||||||||||||||||||||||||||||||
Argument count functions | ||||||||||||||||||||||||||||||||||||||||
vcount | any |
accept all xi |
vcount(x1,x2,…,xn)
vcount() = 0 |
|||||||||||||||||||||||||||||||||||||
vcount.z | any |
accept xi = 0 |
vcount.z(x1,x2,…,xn)
vcount.z(1,1,1,1,0,0,0,-1,-1) |
|||||||||||||||||||||||||||||||||||||
vcount.nz | any |
accept xi ≠ 0 |
vcount.nz(x1,x2,…,xn)
vcount.nz(1,1,1,1,0,0,0,-1,-1) |
|||||||||||||||||||||||||||||||||||||
vcount.az | any |
accept xi > 0 |
vcount.az(x1,x2,…,xn)
vcount.az(1,1,1,1,0,0,0,-1,-1) |
|||||||||||||||||||||||||||||||||||||
vcount.aez | any |
accept xi ≥ 0 |
vcount.aez(x1,x2,…,xn)
vcount.aez(1,1,1,1,0,0,0,-1,-1) |
|||||||||||||||||||||||||||||||||||||
vcount.bz | any |
accept xi < 0 |
vcount.bz(x1,x2,…,xn)
vcount.bz(1,1,1,1,0,0,0,-1,-1) |
|||||||||||||||||||||||||||||||||||||
vcount.bez | any |
accept xi ≤ 0 |
vcount.bez(x1,x2,…,xn)
vcount.bez(1,1,1,1,0,0,0,-1,-1) |
|||||||||||||||||||||||||||||||||||||
vcount.e | -2 |
accept xi = a |
vcount.e(x1,x2,…,xn,a)
vcount.e(3,3,3,3,1,1,1,2,2, 2) |
|||||||||||||||||||||||||||||||||||||
vcount.ne | -2 |
accept xi ≠ a |
vcount.ne(x1,x2,…,xn,a)
vcount.ne(3,3,3,3,1,1,1,2,2, 2) |
|||||||||||||||||||||||||||||||||||||
vcount.a | -2 |
accept xi > a |
vcount.a(x1,x2,…,xn,a)
vcount.a(3,3,3,3,1,1,1,2,2, 2) |
|||||||||||||||||||||||||||||||||||||
vcount.ae | -2 |
accept xi ≥ a |
vcount.ae(x1,x2,…,xn,a)
vcount.ae(3,3,3,3,1,1,1,2,2, 2) |
|||||||||||||||||||||||||||||||||||||
vcount.b | -2 |
accept xi < a |
vcount.b(x1,x2,…,xn,a)
vcount.b(3,3,3,3,1,1,1,2,2, 2) |
|||||||||||||||||||||||||||||||||||||
vcount.be | -2 |
accept xi ≤ a |
vcount.be(x1,x2,…,xn,a)
vcount.be(3,3,3,3,1,1,1,2,2, 2) |
|||||||||||||||||||||||||||||||||||||
Argument filter functions | ||||||||||||||||||||||||||||||||||||||||
varg.z | -1 |
accept xi = 0 |
func(varg.z(x1,x2,…,xn))
vsum(varg.z(1,1,1,1,0,0,0,-1,-1)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.nz | -1 |
accept xi ≠ 0 |
func(varg.nz(x1,x2,…,xn))
vsum(varg.nz(1,1,1,1,0,0,0,-1,-1)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.az | -1 |
accept xi > 0 |
func(varg.az(x1,x2,…,xn))
vsum(varg.az(1,1,1,1,0,0,0,-1,-1)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.aez | -1 |
accept xi ≥ 0 |
func(varg.aez(x1,x2,…,xn))
vsum(varg.aez(1,1,1,1,0,0,0,-1,-1)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.bz | -1 |
accept xi < 0 |
func(varg.bz(x1,x2,…,xn))
vsum(varg.bz(1,1,1,1,0,0,0,-1,-1)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.bez | -1 |
accept xi ≤ 0 |
func(varg.bez(x1,x2,…,xn))
vsum(varg.bez(1,1,1,1,0,0,0,-1,-1)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.e | -2 |
accept xi = a |
func(varg.e(x1,x2,…,xn,a))
vsum(varg.e(3,3,3,3,1,1,1,2,2, 2)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.ne | -2 |
accept xi ≠ a |
func(varg.ne(x1,x2,…,xn,a))
vsum(varg.ne(3,3,3,3,1,1,1,2,2, 2)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.a | -2 |
accept xi > a |
func(varg.a(x1,x2,…,xn,a))
vsum(varg.a(3,3,3,3,1,1,1,2,2, 2)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.ae | -2 |
accept xi ≥ a |
func(varg.ae(x1,x2,…,xn,a))
vsum(varg.ae(3,3,3,3,1,1,1,2,2, 2)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.b | -2 |
accept xi < a |
func(varg.b(x1,x2,…,xn,a))
vsum(varg.b(3,3,3,3,1,1,1,2,2, 2)) ≡ |
|||||||||||||||||||||||||||||||||||||
varg.be | -2 |
accept xi ≤ a |
func(varg.be(x1,x2,…,xn,a))
vsum(varg.be(3,3,3,3,1,1,1,2,2, 2)) ≡ |
|||||||||||||||||||||||||||||||||||||
Compound assignment functions | ||||||||||||||||||||||||||||||||||||||||
inc.pre |
++x |
1 | Prefix increment of the variable by 1 |
++x inc.pre(x)
x - variable
|
||||||||||||||||||||||||||||||||||||
inc.post |
x++ |
1 | Postfix increment of the variable by 1 |
x++ inc.post(x)
x - variable
|
||||||||||||||||||||||||||||||||||||
dec.pre |
--x |
1 | Prefix decrement of the variable by 1 |
--x dec.pre(x)
x - variable
|
||||||||||||||||||||||||||||||||||||
dec.post |
x-- |
1 | Postfix decrement of the variable by 1 |
x-- dec.post(x)
x - variable
|
||||||||||||||||||||||||||||||||||||
co.chs |
-= | 1 | chs + copy function |
co.chs(*x) x-= x = chs(x)
x - variable |
||||||||||||||||||||||||||||||||||||
co.abs |
1 | abs + copy function |
co.abs(*x) x = abs(x)
x - variable |
|||||||||||||||||||||||||||||||||||||
co.nabs |
1 | nabs + copy function |
co.nabs(*x) x = nabs(x)
x - variable |
|||||||||||||||||||||||||||||||||||||
co.add |
+= |
2 | add + copy function |
co.add(*x,y) x += y x = (x + y) |
||||||||||||||||||||||||||||||||||||
co.sub |
-= | 2 | sub + copy function |
co.sub(*x,y) x -= y x = (x - y) |
||||||||||||||||||||||||||||||||||||
co.subr |
~-= | 2 | subr + copy function |
co.subr(*x,y) x ~-= y x = (y - x) |
||||||||||||||||||||||||||||||||||||
co.mul |
*= |
2 | mul + copy function |
co.mul(*x,y) x *= y x = (x * y) |
||||||||||||||||||||||||||||||||||||
co.div |
/= | 2 | div + copy function |
co.div(*x,y) x /= y x = (x / y) |
||||||||||||||||||||||||||||||||||||
co.divr |
~/= | 2 | divr + copy function |
co.divr(*x,y) x ~/= y x = (y / x) |
||||||||||||||||||||||||||||||||||||
co.quo |
\= |
2 | quo + copy function |
co.quo(*x,y) x \= y x = (x \ y) |
||||||||||||||||||||||||||||||||||||
co.quor |
~\= |
2 | quor + copy function |
co.quor(*x,y) x ~\= y x = (y \ x) |
||||||||||||||||||||||||||||||||||||
co.mod |
%= |
2 | mod + copy function |
co.mod(*x,y) x %= y x = (x % y) |
||||||||||||||||||||||||||||||||||||
co.modr |
~%= |
2 | modr + copy function |
co.modr(*x,y) x ~%= y x = (y % x) |
||||||||||||||||||||||||||||||||||||
co.bnot |
~= | 1:i | bnot + copy function |
co.bnot(*x) ~= x x = (~x) x = (bnot x)
x - variable |
||||||||||||||||||||||||||||||||||||
co.bor |
|= | 2:i | bor + copy function |
co.bor(*x,y) x |= y x = (x | y) x = (x bor y) |
||||||||||||||||||||||||||||||||||||
co.bnor |
~|= | 2:i | bnor + copy function |
co.bnor(*x,y) x ~|= y x = (x ~| y) x = (x bnor y) |
||||||||||||||||||||||||||||||||||||
co.born |
|~= | 2:i | born + copy function |
co.born(*x,y) x |~= y x = (x |~ y) x = (x born y) |
||||||||||||||||||||||||||||||||||||
co.bnorn |
~|~= | 2:i | bnorn + copy function |
co.bnorn(*x,y) x ~|~= y x = (x ~|~ y) x = (x bnorn y) |
||||||||||||||||||||||||||||||||||||
co.borc |
|-= | 2:i | borc + copy function |
co.borc(*x,y) x |-= y x = (x |- y) x = (x borc y) |
||||||||||||||||||||||||||||||||||||
co.bnorc |
~|-= | 2:i | bnorc + copy function |
co.bnorc(*x,y) x ~|-= y x = (x ~|- y) x = (x bnorc y) |
||||||||||||||||||||||||||||||||||||
co.bcor |
-|= | 2:i | bcor + copy function |
co.bcor(*x,y) x -|= y x = (x -| y) x = (x bcor y) |
||||||||||||||||||||||||||||||||||||
co.bcorn |
-|~= | 2:i | bcorn + copy function |
co.bcorn(*x,y) x -|~= y x = (x -|~ y) x = (x bcorn y) |
||||||||||||||||||||||||||||||||||||
co.bxor |
^= |
2:i | bxor + copy function |
co.bxor(*x,y) x ^= y x = (x ^ y) x = (x bxor y) |
||||||||||||||||||||||||||||||||||||
co.bxnor |
~^= |
2:i | bxnor + copy function |
co.bxnor(*x,y) x ~^= y x = (x ~^ y) x = (x bxnor y) |
||||||||||||||||||||||||||||||||||||
co.band |
&= | 2:i | band + copy function |
co.band(*x,y) x &= y x = (x & y) x = (x band y) |
||||||||||||||||||||||||||||||||||||
co.bnand |
~&= | 2:i | bnand + copy function |
co.bnand(*x,y) x ~&= y x = (x ~& y) x = (x bnand y) |
||||||||||||||||||||||||||||||||||||
co.bandn |
&~= | 2:i |
bandn + copy function |
co.bandn(*x,y) x &~= y x = (x &~ y) x = (x bandn y) |
||||||||||||||||||||||||||||||||||||
co.bnandn |
~&~= | 2:i |
bnandn + copy function |
co.bnandn(*x,y) x ~&~= y x = (x ~&~ y) x = (x bnandn y) |
||||||||||||||||||||||||||||||||||||
co.breset |
|0|= | 2:i |
breset + copy function |
co.breset(*x,y) x |0|= y x = (x |0| y) x = (x breset y) |
||||||||||||||||||||||||||||||||||||
co.bset |
|1|= | 2:i |
bset + copy function |
co.bset(*x,y) x |1|= y x = (x |1| y) x = (x bset y) |
||||||||||||||||||||||||||||||||||||
co.shr |
>>= | 2:i | shr + copy function |
co.shr(*x,y) x >>= y x = (x >> y) x = (x shr y) |
||||||||||||||||||||||||||||||||||||
co.shl |
<<= | 2:i | shl + copy function |
co.shl(*x,y) x <<= y x = (x << y) x = (x shl y) |
||||||||||||||||||||||||||||||||||||
co.sar |
>>>= | 2:i | sar + copy function |
co.sar(*x,y) x >>>= y x = (x >>> y) x = (x sar y) |
||||||||||||||||||||||||||||||||||||
co.sal |
<<<= | 2:i | sal + copy function |
co.sal(*x,y) x <<<= y x = (x <<< y) x = (x sal y) |
||||||||||||||||||||||||||||||||||||
co.ror |
>><= | 2:i | ror + copy function |
co.ror(*x,y) x >><= y x = (x >>< y) x = (x ror y) |
||||||||||||||||||||||||||||||||||||
co.rol |
<<>= | 2:i | rol + copy function |
co.rol(*x,y) x <<>= y x = (x <<> y) x = (x rol y) |
||||||||||||||||||||||||||||||||||||
Bitwise functions | ||||||||||||||||||||||||||||||||||||||||
bsf |
<<?x |
1:i |
Bit scan forward. Search for the least significant set bit. |
bsf(x) bsf x <<?x
|
||||||||||||||||||||||||||||||||||||
bsr |
>>?x |
1:i |
Bit scan reverse. Search for the most significant set bit. |
bsr(x) bsr x >>?x
|
||||||||||||||||||||||||||||||||||||
bt |
>?< |
2:i |
Bit test. Return the destination bit indexed by the y value. |
bt(x,y) x bt y x >?< y
|
||||||||||||||||||||||||||||||||||||
btc |
>?~< |
2:i |
Bit test and complement. Return the destination bit indexed by the y value and complement (invert) the destination bit. |
btc(x,y) x btc y x >?~< y
|
||||||||||||||||||||||||||||||||||||
btr |
>?-< |
2:i |
Bit test and reset. Return the destination bit indexed by the y value and clear the destination bit. |
btr(x,y) x btr y x >?-< y
|
||||||||||||||||||||||||||||||||||||
bts |
>?+< |
2:i |
Bit test and set. Return the destination bit indexed by the y value and set in the destination bit. |
bts(x,y) x bts y x >?+< y
|
||||||||||||||||||||||||||||||||||||
hammw popcount |
|
1:i |
Hamming weight. Returns the number of 1 bits in the value of x. |
hammw(x) popcount(x)
|
||||||||||||||||||||||||||||||||||||
hammd |
|
2:i |
Hamming distance |
hammd(x,y)
|
||||||||||||||||||||||||||||||||||||
bnot |
~x | 1:i |
Bitwise not |
bnot(x) bnot x ~x
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
bor |
| | 2:i |
Bitwise or
|
bor(x,y) x bor y x | y
|
||||||||||||||||||||||||||||||||||||
bnor |
~| | 2:i |
Bitwise not or
|
bnor(x,y) x bnor y x ~| y ~(x | y)
|
||||||||||||||||||||||||||||||||||||
born |
|~ | 2:i |
Bitwise or not
|
born(x,y) x born y x |~ y x | (~y)
|
||||||||||||||||||||||||||||||||||||
bnorn |
~|~ | 2:i |
Bitwise not or not
|
bnorn(x,y) x bnorn y x ~|~ y ~(x |~ y)
|
||||||||||||||||||||||||||||||||||||
borc |
|- | 2:i |
Bitwise or clear
|
borc(x,y) x borc y x |- y x | (y & 0) ≡ x
|
||||||||||||||||||||||||||||||||||||
bnorc |
~|- | 2:i |
Bitwise not or clear
|
bnorc(x,y) x bnorc y x ~|- y ~x | (y & 0) ≡ ~x
|
||||||||||||||||||||||||||||||||||||
bcor |
-| | 2:i |
Bitwise clear or
|
bcor(x,y) x bcor y x -| y (x & 0) | y ≡ y
|
||||||||||||||||||||||||||||||||||||
bcorn |
-|~ | 2:i |
Bitwise clear or not
|
bcorn(x,y) x bcorn y x -|~ y (x & 0) | ~y ≡ ~y
|
||||||||||||||||||||||||||||||||||||
bxor |
^ |
2:i |
Bitwise xor
|
bxor(x,y) x bxor y x ^ y
|
||||||||||||||||||||||||||||||||||||
bxnor |
~^ |
2:i |
Bitwise not xor
|
bxnor(x,y) x bxnor y x ~^ y ~(x ^ y)
|
||||||||||||||||||||||||||||||||||||
band |
& | 2:i |
Bitwise and
|
band(x,y) x band y x & y
|
||||||||||||||||||||||||||||||||||||
bnand |
~& | 2:i |
Bitwise not and
|
bnand(x,y) x bnand y x ~& y ~(x & y)
|
||||||||||||||||||||||||||||||||||||
bandn |
&~ | 2:i |
Bitwise and not
|
bandn(x,y) x bandn y x &~ y x & (~y)
|
||||||||||||||||||||||||||||||||||||
bnandn |
~&~ | 2:i |
Bitwise not and not
|
bnandn(x,y) x bnandn y x ~&~ y ~(x &~ y)
|
||||||||||||||||||||||||||||||||||||
breset |
|0| | 2:i |
Bitwise reset
|
breset(x,y) x breset y x |0| y |
||||||||||||||||||||||||||||||||||||
bset |
|1| | 2:i |
Bitwise set
|
bset(x,y) x bset y x |1| y |
||||||||||||||||||||||||||||||||||||
shr |
>> | 2:i |
Bitwise shift right.
Shifts "x" right by "count" bits with zeroes shifted
in on the left. |
shr(x,count) x shr count x >> count
shr(x,-|count|) ≡ shl(x,|count|)
|
||||||||||||||||||||||||||||||||||||
shl |
<< | 2:i |
Bitwise shift left.
Shifts "x" left by "count" bits with zeroes shifted
in on right. |
shl(x,count) x shl count x << count
shl(x,-|count|) ≡ shr(x,|count|)
|
||||||||||||||||||||||||||||||||||||
sar |
>>> | 2:i |
Bitwise shift arithmetic right.
Shifts "x" right by "count" bits with the current sign
bit replicated in the leftmost bit. |
sar(x,count) x sar count x >>> count
sar(x,-|count|) ≡ sal(x,|count|)
|
||||||||||||||||||||||||||||||||||||
sal |
<<< | 2:i |
Bitwise shift arithmetic left.
Shifts "x" left by "count" bits with zeroes shifted
in on right. |
sal(x,count) x sal count x <<< count
sal(x,-|count|) ≡ sar(x,|count|)
|
||||||||||||||||||||||||||||||||||||
ror |
>>< | 2:i |
Bitwise rotate right.
Rotates the bits in "x" to the right "count" times with all data pushed out the right side re-entering on the left. |
ror(x,count) x ror count x >>< count
ror(x,-|count|) ≡ rol(x,|count|)
|
||||||||||||||||||||||||||||||||||||
rol |
<<> | 2:i |
Bitwise rotate left.
Rotates the bits in "x" to the left "count" times with all data pushed out the left side re-entering on the right. |
rol(x,count) x rol count x <<> count
rol(x,-|count|) ≡ ror(x,|count|)
|
||||||||||||||||||||||||||||||||||||
Byte functions | ||||||||||||||||||||||||||||||||||||||||
bswap |
1:i |
Byte swap. Reverse the byte order. |
bswap(x)
|
|||||||||||||||||||||||||||||||||||||
b4swap |
1:i |
Byte swap. Reverse the byte order of the first 4 bytes. Returns 32-bit integer value. |
b4swap(x)
|
|||||||||||||||||||||||||||||||||||||
b2swap |
1:i |
Byte swap. Reverse the byte order of the first 2 bytes. Returns 16-bit integer value. |
b2swap(x)
|
|||||||||||||||||||||||||||||||||||||
bitswap |
1:i |
Bit swap. Reverse the bit order. |
bitswap(x)
|
|||||||||||||||||||||||||||||||||||||
bit32swap |
1:i |
Bit swap. Reverse the bit order in the first 4 bytes. Returns 32-bit integer value. |
bit32swap(x)
|
|||||||||||||||||||||||||||||||||||||
bit16swap |
1:i |
Bit swap. Reverse the bit order in the first 2 bytes. Returns 16-bit integer value. |
bit16swap(x)
|
|||||||||||||||||||||||||||||||||||||
bit8swap |
1:i |
Bit swap. Reverse the bit order in the first byte. Returns 8-bit integer value. |
bit8swap(x)
|
|||||||||||||||||||||||||||||||||||||
Boolean functions | ||||||||||||||||||||||||||||||||||||||||
ot bool |
?x |
1:i | Value as boolean |
ot(x) ot x bool(x) bool x ?x ♦ 1 ⇐ x ≠ 0 ♦ 0 ⇐ x = 0 |
||||||||||||||||||||||||||||||||||||
not |
!x |
1:i | Negation |
not(x) not x !x ♦ 1 ⇐ x = 0 ♦ 0 ⇐ x ≠ 0 |
||||||||||||||||||||||||||||||||||||
or |
|| |
2:i | Disjunction |
or(x,y) x or y x || y ♦ 1 ⇐ x≠0 or y≠0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
nor |
!| |
2:i | Negative disjunction |
nor(x,y) x nor y x !| y ♦ 1 ⇐ x=0 and y=0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
xor |
^^ |
2:i | Exclusive disjunction |
xor(x,y) x xor y x ^^ y ♦ 1 ⇐ (x≠0 and y=0) or (x=0 and y≠0) ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
xnor |
!^ |
2:i | Negative exclusive disjunction |
xnor(x,y) x xnor y x !^ y ♦ 1 ⇐ (x=0 or y≠0) and (x≠0 or y=0) ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
and |
&& |
2:i | Conjunction |
and(x,y) x and y x && y ♦ 1 ⇐ x≠0 and y≠0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
nand |
!& |
2:i | Negative conjunction |
nand(x,y) x nand y x !& y ♦ 1 ⇐ x=0 or y=0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
if if.true |
1:i |
True |
if(x) if.true(x) ♦ 1 ⇐ x ≠ 0 ♦ 0 ⇐ x = 0 |
|||||||||||||||||||||||||||||||||||||
if.not if.false |
1:i |
False |
if.not(x) if.false(x) ♦ 1 ⇐ x = 0 ♦ 0 ⇐ x ≠ 0 |
|||||||||||||||||||||||||||||||||||||
if.z |
==. |
1:i |
Zero |
if.z(x) x==. ♦ 1 ⇐ x = 0 ♦ 0 ⇐ x ≠ 0 |
||||||||||||||||||||||||||||||||||||
if.nz |
!=. <>. |
1:i |
Not zero |
if.nz(x) x!=. x<>. ♦ 1 ⇐ x ≠ 0 ♦ 0 ⇐ x = 0 |
||||||||||||||||||||||||||||||||||||
if.az |
>. |
1:i |
Above zero |
if.az(x) x>. ♦ 1 ⇐ x > 0 ♦ 0 ⇐ x ≤ 0 |
||||||||||||||||||||||||||||||||||||
if.aez |
>=. !<. |
1:i |
Above or equal zero |
if.aez(x) x>=. x!<. ♦ 1 ⇐ x ≥ 0 ♦ 0 ⇐ x < 0 |
||||||||||||||||||||||||||||||||||||
if.bz |
<. |
1:i |
Below zero |
if.bz(x) x<. ♦ 1 ⇐ x < 0 ♦ 0 ⇐ x ≥ 0 |
||||||||||||||||||||||||||||||||||||
if.bez |
<=. !>. |
1:i |
Below or equal zero |
if.bez(x) x<=. x!>. ♦ 1 ⇐ x ≤ 0 ♦ 0 ⇐ x > 0 |
||||||||||||||||||||||||||||||||||||
if.e |
== =• |
2:i |
Equal
(•)
|
if.e(x,y) x == y ♦ 1 ⇐ x = y ♦ 0 ⇐ x ≠ y
|
||||||||||||||||||||||||||||||||||||
if.ne |
<> != |
2:i |
Not equal Below or above Less or greater |
if.ne(x,y) x <> y x != y ♦ 1 ⇐ x ≠ y ♦ 0 ⇐ x = y |
||||||||||||||||||||||||||||||||||||
if.a |
> |
2:i |
Above Greater Not below and equal Not less and equal |
if.a(x,y) x > y ♦ 1 ⇐ x > y ♦ 0 ⇐ x ≤ y |
||||||||||||||||||||||||||||||||||||
if.ae |
>= !< |
2:i |
Above or equal Greater or equal Not below Not less |
if.ae(x,y) x >= y x !< y ♦ 1 ⇐ x ≥ y ♦ 0 ⇐ x < y |
||||||||||||||||||||||||||||||||||||
if.b |
< |
2:i |
Below Less Not above and equal Not greater and equal |
if.b(x,y) x < y ♦ 1 ⇐ x < y ♦ 0 ⇐ x ≥ y |
||||||||||||||||||||||||||||||||||||
if.be |
<= !> |
2:i |
Below or equal Less or equal Not above Not greater |
if.be(x,y) x <= y x !> y ♦ 1 ⇐ x ≤ y ♦ 0 ⇐ x > y |
||||||||||||||||||||||||||||||||||||
if.bea |
<==> |
2:i |
Three-way comparison Below-Equal-Above |
if.bea(x,y) x <==> y ♦ -1 ⇐ x < y ♦ 0 ⇐ x = y ♦ +1 ⇐ x > y |
||||||||||||||||||||||||||||||||||||
if.aeb |
>==< |
2:i |
Three-way comparison Above-Equal-Below |
if.aeb(x,y) x >==< y ♦ -1 ⇐ x > y ♦ 0 ⇐ x = y ♦ +1 ⇐ x < y |
||||||||||||||||||||||||||||||||||||
if.or |
-2:i |
Multi or function
Argument filters varg(…) not allowed. |
if.or (x,Y1,Y2,…,Yn) ♦ 1 ⇐ (x=Y1) or (x=Y2) … or (x=Yn) ♦ 0 ⇐ othewise |
|||||||||||||||||||||||||||||||||||||
if.nor |
-2:i |
Multi nor function
Argument filters varg(…) not allowed. |
if.nor (x,Y1,Y2,…,Yn) ♦ 1 ⇐ (x≠Y1) and (x≠Y2) … and (x≠Yn) ♦ 0 ⇐ othewise |
|||||||||||||||||||||||||||||||||||||
if.and |
-2:i |
Multi and function
Argument filters varg(…) not allowed. |
if.and (x,Y1,Y2,…,Yn) ♦ 1 ⇐ (x=Y1) and (x=Y2) … and (x=Yn) ♦ 0 ⇐ othewise |
|||||||||||||||||||||||||||||||||||||
if.nand |
-2:i |
Multi nand function
Argument filters varg(…) not allowed. |
if.nand (x,Y1,Y2,…,Yn) ♦ 1 ⇐ (x≠Y1) or (x≠Y2) … or (x≠Yn) ♦ 0 ⇐ othewise |
|||||||||||||||||||||||||||||||||||||
Approximate boolean functions | ||||||||||||||||||||||||||||||||||||||||
ε = 2-46 = 1.4210854715202004e-14 ε' = 2-46+δ δ = max(0,min(x.exponent,y.exponent)) |
||||||||||||||||||||||||||||||||||||||||
aif.z |
==.~ |
1:i |
Approximately zero |
aif.z(x) x==.~ ♦ 1 ⇐ |x| < ε ♦ 0 ⇐ |x| ≥ ε
|
||||||||||||||||||||||||||||||||||||
aif.nz |
!=.~ <>.~ |
1:i |
Approximately not zero |
aif.nz(x) x!=.~ x<>.~ ♦ 1 ⇐ |x| ≥ ε ♦ 0 ⇐ |x| < ε
|
||||||||||||||||||||||||||||||||||||
aif.az |
>.~ |
1:i |
Approximately above zero |
aif.az(x) x>.~ ♦ 1 ⇐ x ≥ ε ♦ 0 ⇐ x < ε
|
||||||||||||||||||||||||||||||||||||
aif.aez |
>=.~ !<.~ |
1:i |
Approximately above or equal zero |
aif.aez(x) x>=.~ x!<.~ ♦ 1 ⇐ x > -ε ♦ 0 ⇐ x ≤ -ε
|
||||||||||||||||||||||||||||||||||||
aif.bz |
<.~ |
1:i |
Approximately below zero |
aif.bz(x) x<.~ ♦ 1 ⇐ x ≤ -ε ♦ 0 ⇐ x > -ε
|
||||||||||||||||||||||||||||||||||||
aif.bez |
<=.~ !>.~ |
1:i |
Approximately below or equal zero |
aif.bez(x) x<=.~ x!>.~ ♦ 1 ⇐ x < ε ♦ 0 ⇐ x ≥ ε
|
||||||||||||||||||||||||||||||||||||
aif.e |
==~ |
2:i |
Approximately equal |
aif.e(x,y) x ==~ y ♦ 1 ⇐ |x-y| < ε' ♦ 0 ⇐ |x-y| ≥ ε'
|
||||||||||||||||||||||||||||||||||||
aif.ne |
!=~ <>~ |
2:i |
Approximately not equal |
aif.ne(x,y) x !=~ y x <>~ y ♦ 1 ⇐ |x-y| ≥ ε' ♦ 0 ⇐ |x-y| < ε'
|
||||||||||||||||||||||||||||||||||||
aif.a |
>~ |
2:i |
Approximately above |
aif.a(x,y) x >~ y ♦ 1 ⇐ x-y ≥ ε' ♦ 0 ⇐ x-y < ε'
|
||||||||||||||||||||||||||||||||||||
aif.ae |
>=~ !<~ |
2:i |
Approximately above or equal |
aif.ae(x,y) x >=~ y x !<~ y ♦ 1 ⇐ x-y > -ε' ♦ 0 ⇐ x-y ≤ -ε'
|
||||||||||||||||||||||||||||||||||||
aif.b |
<~ |
2:i |
Approximately below |
aif.b(x,y) x <~ y ♦ 1 ⇐ x-y ≤ -ε' ♦ 0 ⇐ x-y > -ε'
|
||||||||||||||||||||||||||||||||||||
aif.be |
<=~ !>~ |
2:i |
Approximately below or equal |
aif.be(x,y) x <=~ y x !>~ y ♦ 1 ⇐ x-y < ε' ♦ 0 ⇐ x-y ≥ ε'
|
||||||||||||||||||||||||||||||||||||
aif.bea |
<==>~ |
2:i |
Three-way approximate comparison Below-Equal-Above |
aif.bea(x,y) x <==>~ y ♦ -1 ⇐ (x-y) ≤ -ε' ♦ 0 ⇐ |x-y| < ε' ♦ +1 ⇐ (x-y) ≥ ε'
|
||||||||||||||||||||||||||||||||||||
aif.aeb |
>==<~ |
2:i |
Three-way approximate comparison Above-Equal-Below |
aif.aeb(x,y) x >==<~ y ♦ -1 ⇐ (x-y) ≥ ε' ♦ 0 ⇐ |x-y| < ε' ♦ +1 ⇐ (x-y) ≤ -ε'
|
||||||||||||||||||||||||||||||||||||
Conditional functions | ||||||||||||||||||||||||||||||||||||||||
ie ie.true |
3 | Conditional function |
ie (x,T,F) ie.true (x,T,F) ♦ T ⇐ x ≠ 0 ♦ F ⇐ x = 0 |
|||||||||||||||||||||||||||||||||||||
ie.not ie.false |
3 | Conditional function |
ie.not (x,T,F) ie.false (x,T,F) ♦ T ⇐ x = 0 ♦ F ⇐ x ≠ 0 |
|||||||||||||||||||||||||||||||||||||
ie.z | 3 | Conditional function |
ie.z (x,T,F) ♦ T ⇐ x = 0 ♦ F ⇐ x ≠ 0 |
|||||||||||||||||||||||||||||||||||||
ie.nz | 3 | Conditional function |
ie.nz (x,T,F) ♦ T ⇐ x ≠ 0 ♦ F ⇐ x = 0 |
|||||||||||||||||||||||||||||||||||||
ie.az | 3 | Conditional function |
ie.az (x,T,F) ♦ T ⇐ x > 0 ♦ F ⇐ x ≤ 0 |
|||||||||||||||||||||||||||||||||||||
ie.aez | 3 | Conditional function |
ie.aez (x,T,F) ♦ T ⇐ x ≥ 0 ♦ F ⇐ x < 0 |
|||||||||||||||||||||||||||||||||||||
ie.bz | 3 | Conditional function |
ie.bz (x,T,F) ♦ T ⇐ x < 0 ♦ F ⇐ x ≥ 0 |
|||||||||||||||||||||||||||||||||||||
ie.bez | 3 | Conditional function |
ie.bez (x,T,F) ♦ T ⇐ x ≤ 0 ♦ F ⇐ x > 0 |
|||||||||||||||||||||||||||||||||||||
ie.e | 4 | Conditional function |
ie.e (x,y,T,F) ♦ T ⇐ x = y ♦ F ⇐ x ≠ y |
|||||||||||||||||||||||||||||||||||||
ie.ne | 4 | Conditional function |
ie.ne (x,y,T,F) ♦ T ⇐ x ≠ y ♦ F ⇐ x = y |
|||||||||||||||||||||||||||||||||||||
ie.a | 4 | Conditional function |
ie.a (x,y,T,F) ♦ T ⇐ x > y ♦ F ⇐ x ≤ y |
|||||||||||||||||||||||||||||||||||||
ie.ae | 4 | Conditional function |
ie.ae (x,y,T,F) ♦ T ⇐ x ≥ y ♦ F ⇐ x < y |
|||||||||||||||||||||||||||||||||||||
ie.b | 4 | Conditional function |
ie.b (x,y,T,F) ♦ T ⇐ x < y ♦ F ⇐ x ≥ y |
|||||||||||||||||||||||||||||||||||||
ie.be | 4 | Conditional function |
ie.be (x,y,T,F) ♦ T ⇐ x ≤ y ♦ F ⇐ x > y |
|||||||||||||||||||||||||||||||||||||
ie.bea | 5 |
Conditional function Below-Equal-Above |
ie.bea (x,y,V1,V2,V3) ♦ V1 ⇐ x < y ♦ V2 ⇐ x = y ♦ V3 ⇐ x > y |
|||||||||||||||||||||||||||||||||||||
ie.aeb | 5 |
Conditional function Above-Equal-Below |
ie.aeb (x,y,V1,V2,V3) ♦ V1 ⇐ x > y ♦ V2 ⇐ x = y ♦ V3 ⇐ x < y |
|||||||||||||||||||||||||||||||||||||
ie.or |
-4 |
Conditional function
Argument filters varg(…) not allowed. |
ie.or (x,Y1,Y2,…,Yn,T,F) ♦ T ⇐ (x=Y1) or (x=Y2) … or (x=Yn) ♦ F ⇐ othewise |
|||||||||||||||||||||||||||||||||||||
ie.nor |
-4 |
Conditional function
Argument filters varg(…) not allowed. |
ie.nor (x,Y1,Y2,…,Yn,T,F) ♦ T ⇐ (x≠Y1) and (x≠Y2) … and (x≠Yn) ♦ F ⇐ othewise |
|||||||||||||||||||||||||||||||||||||
ie.and |
-4 |
Conditional function
Argument filters varg(…) not allowed. |
ie.and (x,Y1,Y2,…,Yn,T,F) ♦ T ⇐ (x=Y1) and (x=Y2) … and (x=Yn) ♦ F ⇐ othewise |
|||||||||||||||||||||||||||||||||||||
ie.nand |
-4 |
Conditional function
Argument filters varg(…) not allowed. |
ie.nand (x,Y1,Y2,…,Yn,T,F) ♦ T ⇐ (x≠Y1) or (x≠Y2) … or (x≠Yn) ♦ F ⇐ othewise |
|||||||||||||||||||||||||||||||||||||
Case functions | ||||||||||||||||||||||||||||||||||||||||
case.e case |
-2 |
Case switch
Argument filters varg(…) not allowed. |
case.e (x,P1,V1,P2,V2,…,Pn,Vn,V) case (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x=Pi ♦ V ⇐ no match
case.e (x,P1,V1,P2,V2,…,Pn,Vn)
scan from P1 to Pn |
|||||||||||||||||||||||||||||||||||||
rcase.e rcase |
-2 |
Reverse case switch
Argument filters varg(…) not allowed. |
rcase.e (x,P1,V1,P2,V2,…,Pn,Vn,V) rcase (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x=Pi ♦ V ⇐ no match
rcase.e (x,P1,V1,P2,V2,…,Pn,Vn)
scan from Pn to P1 |
|||||||||||||||||||||||||||||||||||||
case.ne ncase |
-2 |
Case switch
Argument filters varg(…) not allowed. |
case.ne (x,P1,V1,P2,V2,…,Pn,Vn,V) ncase (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x≠Pi ♦ V ⇐ no match
case.ne (x,P1,V1,P2,V2,…,Pn,Vn)
scan from P1 to Pn |
|||||||||||||||||||||||||||||||||||||
rcase.ne rncase |
-2 |
Reverse case switch
Argument filters varg(…) not allowed. |
rcase.ne (x,P1,V1,P2,V2,…,Pn,Vn,V) rncase (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x≠Pi ♦ V ⇐ no match
rcase.ne (x,P1,V1,P2,V2,…,Pn,Vn)
scan from Pn to P1 |
|||||||||||||||||||||||||||||||||||||
case.a |
-2 |
Case switch
Argument filters varg(…) not allowed. |
case.a (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x>Pi ♦ V ⇐ no match
case.a (x,P1,V1,P2,V2,…,Pn,Vn)
scan from P1 to Pn |
|||||||||||||||||||||||||||||||||||||
rcase.a |
-2 |
Reverse case switch
Argument filters varg(…) not allowed. |
rcase.a (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x>Pi ♦ V ⇐ no match
rcase.a (x,P1,V1,P2,V2,…,Pn,Vn)
scan from Pn to P1 |
|||||||||||||||||||||||||||||||||||||
case.ae |
-2 |
Case switch
Argument filters varg(…) not allowed. |
case.ae (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x≥Pi ♦ V ⇐ no match
case.ae (x,P1,V1,P2,V2,…,Pn,Vn)
scan from P1 to Pn |
|||||||||||||||||||||||||||||||||||||
rcase.ae |
-2 |
Reverse case switch
Argument filters varg(…) not allowed. |
rcase.ae (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x≥Pi ♦ V ⇐ no match
rcase.ae (x,P1,V1,P2,V2,…,Pn,Vn)
scan from Pn to P1 |
|||||||||||||||||||||||||||||||||||||
case.b |
-2 |
Case switch
Argument filters varg(…) not allowed. |
case.b (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x<Pi ♦ V ⇐ no match
case.b (x,P1,V1,P2,V2,…,Pn,Vn)
scan from P1 to Pn |
|||||||||||||||||||||||||||||||||||||
rcase.b |
-2 |
Reverse case switch
Argument filters varg(…) not allowed. |
rcase.b (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x<Pi ♦ V ⇐ no match
rcase.b (x,P1,V1,P2,V2,…,Pn,Vn)
scan from Pn to P1 |
|||||||||||||||||||||||||||||||||||||
case.be |
-2 |
Case switch
Argument filters varg(…) not allowed. |
case.be (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x≤Pi ♦ V ⇐ no match
case.be (x,P1,V1,P2,V2,…,Pn,Vn)
scan from P1 to Pn |
|||||||||||||||||||||||||||||||||||||
rcase.be |
-2 |
Reverse case switch
Argument filters varg(…) not allowed. |
rcase.be (x,P1,V1,P2,V2,…,Pn,Vn,V) ♦ Vi ⇐ x≤Pi ♦ V ⇐ no match
rcase.be (x,P1,V1,P2,V2,…,Pn,Vn)
scan from Pn to P1 |
|||||||||||||||||||||||||||||||||||||
case.x32 |
2 |
Case switch |
case.x32 (x,y) ♦ x ⇐ DLL is x32 ♦ y ⇐ DLL is not x32 |
|||||||||||||||||||||||||||||||||||||
case.n32 |
2 |
Case switch |
case.n32 (x,y) ♦ x ⇐ DLL is not x32 ♦ y ⇐ DLL is x32 |
|||||||||||||||||||||||||||||||||||||
case.x64 |
2 |
Case switch |
case.x64 (x,y) ♦ x ⇐ DLL is x64 ♦ y ⇐ DLL is not x64 |
|||||||||||||||||||||||||||||||||||||
case.n64 |
2 |
Case switch |
case.n64 (x,y) ♦ x ⇐ DLL is not x64 ♦ y ⇐ DLL is x64 |
|||||||||||||||||||||||||||||||||||||
GOTO functions | ||||||||||||||||||||||||||||||||||||||||
goto | 1:0 | Unconditional jump |
goto (label) |
|||||||||||||||||||||||||||||||||||||
xgoto | -2:0 |
Jump by index
Argument filters varg(…) not allowed. |
xgoto (label0, label1, …, labeln, index) index - integer value
jump to labelindex if index ∈ [0..n]
|
|||||||||||||||||||||||||||||||||||||
rxgoto | -2:0 |
Jump by reverse index
Argument filters varg(…) not allowed. |
rxgoto (labeln, …, label1, label0, index) index - integer value
jump to labelindex if index ∈ [0..n] |
|||||||||||||||||||||||||||||||||||||
goto.if.x32 |
1:0 |
Conditional jump |
goto.if.x32 (label)
jump to label if DLL is x32 |
|||||||||||||||||||||||||||||||||||||
goto.if.n32 |
1:0 |
Conditional jump |
goto.if.n32 (label)
jump to label if DLL is not x32 |
|||||||||||||||||||||||||||||||||||||
goto.if.x64 |
1:0 |
Conditional jump |
goto.if.x64 (label)
jump to label if DLL is x64 |
|||||||||||||||||||||||||||||||||||||
goto.if.n64 |
1:0 |
Conditional jump |
goto.if.n64 (label)
jump to label if DLL is not x64 |
|||||||||||||||||||||||||||||||||||||
goto.if goto.if.true |
2:0 | Conditional jump |
goto.if (label, x) goto.if.true (label, x)
jump to label if x ≠ 0 |
|||||||||||||||||||||||||||||||||||||
goto.if.not goto.if.false |
2:0 | Conditional jump |
goto.if.not (label, x) goto.if.false (label, x)
jump to label if x = 0 |
|||||||||||||||||||||||||||||||||||||
goto.if.z | 2:0 | Conditional jump |
goto.if.z (label, x)
jump to label if x = 0 |
|||||||||||||||||||||||||||||||||||||
goto.if.nz | 2:0 | Conditional jump |
goto.if.nz (label, x)
jump to label if x ≠ 0 |
|||||||||||||||||||||||||||||||||||||
goto.if.az | 2:0 | Conditional jump |
goto.if.az (label, x)
jump to label if x > 0 |
|||||||||||||||||||||||||||||||||||||
goto.if.aez | 2:0 | Conditional jump |
goto.if.aez (label, x)
jump to label if x ≥ 0 |
|||||||||||||||||||||||||||||||||||||
goto.if.bz | 2:0 | Conditional jump |
goto.if.bz (label, x)
jump to label if x < 0 |
|||||||||||||||||||||||||||||||||||||
goto.if.bez | 2:0 | Conditional jump |
goto.if.bez (label, x)
jump to label if x ≤ 0 |
|||||||||||||||||||||||||||||||||||||
goto.if.or | -3:0 |
Conditional jump
Argument filters varg(…) not allowed. |
goto.if.or (label, x,Y1,Y2,…,Yn)
jump to label if |
|||||||||||||||||||||||||||||||||||||
goto.if.nor | -3:0 |
Conditional jump
Argument filters varg(…) not allowed. |
goto.if.nor (label, x,Y1,Y2,…,Yn)
jump to label if |
|||||||||||||||||||||||||||||||||||||
goto.if.and | -3:0 |
Conditional jump
Argument filters varg(…) not allowed. |
goto.if.and (label, x,Y1,Y2,…,Yn)
jump to label if |
|||||||||||||||||||||||||||||||||||||
goto.if.nand | -3:0 |
Conditional jump
Argument filters varg(…) not allowed. |
goto.if.nand (label, x,Y1,Y2,…,Yn)
jump to label if |
|||||||||||||||||||||||||||||||||||||
CALL functions | ||||||||||||||||||||||||||||||||||||||||
proc.begin proc.end | 0:0 | Procedure stack frame functions |
proc.begin ... proc.end
|
|||||||||||||||||||||||||||||||||||||
retn | 0:0 | Return from procedure |
retn |
|||||||||||||||||||||||||||||||||||||
call | 1:0 | Procedure call |
call (proc) |
|||||||||||||||||||||||||||||||||||||
calls | -1:0 |
Procedure call
Argument filters varg(…) not allowed. |
calls (proc1, proc2, …, procn)
call proc1;
|
|||||||||||||||||||||||||||||||||||||
rcalls | -1:0 |
Reverse procedure call
Argument filters varg(…) not allowed. |
rcalls (proc1, proc2, …, procn)
call procn; |
|||||||||||||||||||||||||||||||||||||
xcall | -2:0 |
Procedure call by index
Argument filters varg(…) not allowed. |
xcall (proc0, proc1, …, procn, index) index - integer value
call procindex if index ∈ [0..n]
|
|||||||||||||||||||||||||||||||||||||
rxcall | -2:0 |
Procedure call by reverse index
Argument filters varg(…) not allowed. |
rxcall (procn, …, proc1, proc0, index) index - integer value
call procindex if index ∈ [0..n] |
|||||||||||||||||||||||||||||||||||||
call.if.x32 |
1:0 |
Conditional call |
call.if.x32 (proc)
call proc if DLL is x32 |
|||||||||||||||||||||||||||||||||||||
call.if.n32 |
1:0 |
Conditional call |
call.if.n32 (proc)
call proc if DLL is not x32 |
|||||||||||||||||||||||||||||||||||||
call.if.x64 |
1:0 |
Conditional call |
call.if.x64 (proc)
call proc if DLL is x64 |
|||||||||||||||||||||||||||||||||||||
call.if.n64 |
1:0 |
Conditional call |
call.if.n64 (proc)
call proc if DLL is not x64 |
|||||||||||||||||||||||||||||||||||||
call.ie.x32 |
2:0 |
Conditional call |
call.ie.x32 (if.proc, else.proc)
call if.proc if DLL is x32, |
|||||||||||||||||||||||||||||||||||||
call.ie.n32 |
2:0 |
Conditional call |
call.ie.n32 (if.proc, else.proc)
call if.proc if DLL is not x32, |
|||||||||||||||||||||||||||||||||||||
call.ie.x64 |
2:0 |
Conditional call |
call.ie.x64 (if.proc, else.proc)
call if.proc if DLL is x64, |
|||||||||||||||||||||||||||||||||||||
call.ie.n64 |
2:0 |
Conditional call |
call.ie.n64 (if.proc, else.proc)
call if.proc if DLL is not x64, |
|||||||||||||||||||||||||||||||||||||
call.if call.if.true |
2:0 | Conditional call |
call.if (proc, x) call.if.true (proc, x)
call proc if x ≠ 0 |
|||||||||||||||||||||||||||||||||||||
call.if.not call.if.false |
2:0 | Conditional call |
call.if.not (proc, x) call.if.false (proc, x)
call proc if x = 0 |
|||||||||||||||||||||||||||||||||||||
call.if.z | 2:0 | Conditional call |
call.if.z (proc, x)
call proc if x = 0 |
|||||||||||||||||||||||||||||||||||||
call.if.nz | 2:0 | Conditional call |
call.if.nz (proc, x)
call proc if x ≠ 0 |
|||||||||||||||||||||||||||||||||||||
call.if.az | 2:0 | Conditional call |
call.if.az (proc, x)
call proc if x > 0 |
|||||||||||||||||||||||||||||||||||||
call.if.aez | 2:0 | Conditional call |
call.if.aez (proc, x)
call proc if x ≥ 0 |
|||||||||||||||||||||||||||||||||||||
call.if.bz | 2:0 | Conditional call |
call.if.bz (proc, x)
call proc if x < 0 |
|||||||||||||||||||||||||||||||||||||
call.if.bez | 2:0 | Conditional call |
call.if.bez (proc, x)
call proc if x ≤ 0 |
|||||||||||||||||||||||||||||||||||||
call.ie call.ie.true |
3:0 | Conditional call |
call.ie (if.proc, else.proc, x) call.ie.true (if.proc, else.proc, x)
call if.proc if x ≠ 0, |
|||||||||||||||||||||||||||||||||||||
call.ie.not call.ie.false |
3:0 | Conditional call |
call.ie.not (if.proc, else.proc, x) call.ie.false (if.proc, else.proc, x)
call if.proc if x = 0, |
|||||||||||||||||||||||||||||||||||||
call.ie.z | 3:0 | Conditional call |
call.ie.z (if.proc, else.proc, x)
call if.proc if x = 0, |
|||||||||||||||||||||||||||||||||||||
call.ie.nz | 3:0 | Conditional call |
call.ie.nz (if.proc, else.proc, x)
call if.proc if x ≠ 0, |
|||||||||||||||||||||||||||||||||||||
call.ie.az | 3:0 | Conditional call |
call.ie.az (if.proc, else.proc, x)
call if.proc if x > 0, |
|||||||||||||||||||||||||||||||||||||
call.ie.aez | 3:0 | Conditional call |
call.ie.aez (if.proc, else.proc, x)
call if.proc if x ≥ 0, |
|||||||||||||||||||||||||||||||||||||
call.ie.bz | 3:0 | Conditional call |
call.ie.bz (if.proc, else.proc, x)
call if.proc if x < 0, |
|||||||||||||||||||||||||||||||||||||
call.ie.bez | 3:0 | Conditional call |
call.ie.bez (if.proc, else.proc, x)
call if.proc if x ≤ 0, |
|||||||||||||||||||||||||||||||||||||
call.if.or | -3:0 |
Conditional call
Argument filters varg(…) not allowed. |
call.if.or (proc, x,Y1,Y2,…,Yn)
call proc if |
|||||||||||||||||||||||||||||||||||||
call.if.nor | -3:0 |
Conditional call
Argument filters varg(…) not allowed. |
call.if.nor (proc, x,Y1,Y2,…,Yn)
call proc if |
|||||||||||||||||||||||||||||||||||||
call.if.and | -3:0 |
Conditional call
Argument filters varg(…) not allowed. |
call.if.and (proc, x,Y1,Y2,…,Yn)
call proc if |
|||||||||||||||||||||||||||||||||||||
call.if.nand | -3:0 |
Conditional call
Argument filters varg(…) not allowed. |
call.if.nand (proc, x,Y1,Y2,…,Yn)
call proc if |
|||||||||||||||||||||||||||||||||||||
call.ie.or | -4:0 |
Conditional call
Argument filters varg(…) not allowed. |
call.ie.or (if.proc, else.proc, x,Y1,Y2,…,Yn)
call if.proc if |
|||||||||||||||||||||||||||||||||||||
call.ie.nor | -4:0 |
Conditional call
Argument filters varg(…) not allowed. |
call.ie.nor (if.proc, else.proc, x,Y1,Y2,…,Yn)
call if.proc if |
|||||||||||||||||||||||||||||||||||||
call.ie.and | -4:0 |
Conditional call
Argument filters varg(…) not allowed. |
call.ie.and (if.proc, else.proc, x,Y1,Y2,…,Yn)
call if.proc if |
|||||||||||||||||||||||||||||||||||||
call.ie.nand | -4:0 |
Conditional call
Argument filters varg(…) not allowed. |
call.ie.nand (if.proc, else.proc, x,Y1,Y2,…,Yn)
call if.proc if |
|||||||||||||||||||||||||||||||||||||
Matrix and array functions | ||||||||||||||||||||||||||||||||||||||||
matrip |
-1:i |
n-dimensional matrix item position. No range control
Argument filters varg(…) not allowed. |
matrip(n1,n2,…[,nn], i1,i2,…,in)
ni - dimension value
ni,ii - constant or variable
nn - optional argument
Returns:
|
|||||||||||||||||||||||||||||||||||||
matrip.rc |
-1:i |
n-dimensional matrix item position. Range control
Argument filters varg(…) not allowed. |
matrip.rc(n1,n2,…,nn, i1,i2,…,in)
ni - dimension value
ni,ii - constant or variable
Returns:
Returns -1 on error.
|
|||||||||||||||||||||||||||||||||||||
farr |
-> u[…] |
2 |
Read double array item value. Forward search |
farr(*u,n) u -> n u[n]
u - double variable
u[n1,…] farr(*u,matrip(n1,…))
u - double variable |
||||||||||||||||||||||||||||||||||||
pfarr |
*-> u{…} |
2 |
Read double array item value. Forward search. Indirect |
pfarr(*pu,n) pu *-> n pu{n}
pu - integer variable
n - value
pu{n1,…} pfarr(*pu,matrip(n1,…))
pu - integer variable
ni - constant or variable
|
||||||||||||||||||||||||||||||||||||
barr |
~> |
2 |
Read double array item value. Backward search |
barr(*u,n) u ~> n
u - double variable
|
||||||||||||||||||||||||||||||||||||
pbarr |
*~> |
2 |
Read double array item value. Backward search. Indirect |
pbarr(*pu,n) pu *~> n
pu - integer variable
n - value
|
||||||||||||||||||||||||||||||||||||
farw |
3 |
Write value to double array item. Forward search |
farw(*u,n,x) u -> n = x
u - double variable write x to farr(u,n)
u[n1,…] = x farw(*u,matrip(n1,…),x)
u - double variable
|
|||||||||||||||||||||||||||||||||||||
pfarw |
3 |
Write value to double array item. Forward search. Indirect |
pfarw(*pu,n,x) pu *-> n = x
pu - integer variable
n - value write x to pfarr(pu,n)
pu{n1,…} = x pfarw(*pu,matrip(n1,…),x)
pu - integer variable
ni - constant or variable
|
|||||||||||||||||||||||||||||||||||||
barw |
3 |
Write value to double array item. Backward search |
barw(*u,n,x) u ~> n = x
u - double variable write x to barr(u,n) |
|||||||||||||||||||||||||||||||||||||
pbarw |
3 |
Write value to double array item. Backward search. Indirect |
pbarw(*pu,n,x) pu *~> n = x
pu - integer variable
n - value write x to pbarr(pu,n) |
|||||||||||||||||||||||||||||||||||||
fara |
&-> |
2:i 2:p |
Get double array item address. Forward search |
fara(*u,n) u &-> n
u - double variable
if n is constant,
|
||||||||||||||||||||||||||||||||||||
pfara |
*&-> |
2:i |
Get double array item address. Forward search. Indirect |
pfara(*pu,n) pu *&-> n
pu - integer variable
n - value
|
||||||||||||||||||||||||||||||||||||
bara |
&~> |
2:i 2:p |
Get double array item address. Backward search |
bara(*u,n) u &~> n
u - double variable
if n is constant,
|
||||||||||||||||||||||||||||||||||||
pbara |
*&~> |
2:i |
Get double array item address. Backward search. Indirect |
pbara(*pu,n) pu *&~> n
pu - integer variable
n - value
|
||||||||||||||||||||||||||||||||||||
farv |
->> |
2 |
Double array item as variable. Forward search |
farv(*u,n) u ->> n
u - double variable
|
||||||||||||||||||||||||||||||||||||
barv |
~>> |
2 |
Double array item as variable. Backward search |
barv(*u,n) u ~>> n
u - double variable
|
||||||||||||||||||||||||||||||||||||
Base functions | ||||||||||||||||||||||||||||||||||||||||
zero fldz |
0 | Load +0.0 | ||||||||||||||||||||||||||||||||||||||
fld1 |
0 | Load +1.0 | ||||||||||||||||||||||||||||||||||||||
fldpi |
0 | Load π | ||||||||||||||||||||||||||||||||||||||
fldl2t |
0 | Load log210 | ||||||||||||||||||||||||||||||||||||||
fldl2e |
0 | Load log2e | ||||||||||||||||||||||||||||||||||||||
fldlg2 |
0 | Load log102 | ||||||||||||||||||||||||||||||||||||||
fldln2 |
0 | Load loge2 | ||||||||||||||||||||||||||||||||||||||
nan |
0 |
Load a NaN (Not-A-Number) value 0xFFF8000000000000 = 0.0/0.0 |
||||||||||||||||||||||||||||||||||||||
nanu |
0 |
Load a NaN (Not-A-Number) value 0xFFFFFFFFFFFFFFFF |
||||||||||||||||||||||||||||||||||||||
pinf |
0 |
Load a positive infinity value 0x7FF0000000000000 = +1.0/0.0 |
||||||||||||||||||||||||||||||||||||||
ninf |
0 |
Load a negative infinity value 0xFFF0000000000000 = -1.0/0.0 |
||||||||||||||||||||||||||||||||||||||
peps |
0 |
Load a positive epsilon value 0x0000000000000001 +4.9406564584124654e-324 = +2-1074 |
||||||||||||||||||||||||||||||||||||||
neps |
0 |
Load a negative epsilon value 0x8000000000000001 -4.9406564584124654e-324 = -2-1074 |
||||||||||||||||||||||||||||||||||||||
maxd |
0 |
Load a maximum double value 0x7FEFFFFFFFFFFFFF +1.7976931348623157e+308 = +21023 *(2-2-52) |
||||||||||||||||||||||||||||||||||||||
mind |
0 |
Load a minimum double value 0xFFEFFFFFFFFFFFFF -1.7976931348623157e+308 = -21023 *(2-2-52) |
||||||||||||||||||||||||||||||||||||||
f2xm1 | 1 | #FPU |
2x-1 |x| < 1 |
|||||||||||||||||||||||||||||||||||||
fyl2x | 2 | #FPU |
y * log2(x) x > 0 |
|||||||||||||||||||||||||||||||||||||
fyl2xp1 | 2 | #FPU |
y * log2(x+1) |x| < (1-a), a = (1/2)*21/2 |
|||||||||||||||||||||||||||||||||||||
fprem |
2 | Partial remainder |
fprem(x,y) = x - Q * y Q = round(x/y) → zero |
|||||||||||||||||||||||||||||||||||||
frprem |
2 | Reverse partial remainder |
frprem(x,y) = y - Q * x Q = round(y/x) → zero |
|||||||||||||||||||||||||||||||||||||
fprem1 |
2 | IEEE partial remainder |
fprem1(x,y) = x - Q * y Q = round(x/y) → nearest integer |
|||||||||||||||||||||||||||||||||||||
frprem1 |
2 | Reverse IEEE partial remainder |
frprem1(x,y) = y - Q * x Q = round(y/x) → nearest integer |
|||||||||||||||||||||||||||||||||||||
fscale |
2 | Scale by power of two |
fscale(x,y) = x * 2y
fscale(1.2056326171875,10) = | |||||||||||||||||||||||||||||||||||||
frscale |
2 | Reverse scale by power of two |
frscale(x,y) = y * 2x
frscale(10,1.2056326171875) = |
|||||||||||||||||||||||||||||||||||||
fxtracts |
1 | Extract significant |
1234.5678 = 1.2056326171875 * 210
fxtracts(1234.5678) = |
|||||||||||||||||||||||||||||||||||||
fxtracte |
1 | Extract exponent |
1234.5678 = 1.2056326171875 * 210
fxtracte(1234.5678) = |
|||||||||||||||||||||||||||||||||||||
fxtractse |
1:2 | Extract significant & exponent |
fxtractse(x) = (s,e)
1234.5678 = 1.2056326171875 * 210
fxtractse(1234.5678) =
|
|||||||||||||||||||||||||||||||||||||
co.fxtractse |
3 | Extract significant & exponent |
co.fxtractse(*s,*e, x)
1234.5678 = 1.2056326171875 * 210
fxtractse(1234.5678) =
|
|||||||||||||||||||||||||||||||||||||
fxtractes |
1:2 | Extract exponent & significant |
fxtractes(x) = (e,s)
1234.5678 = 1.2056326171875 * 210
fxtractes(1234.5678) =
|
|||||||||||||||||||||||||||||||||||||
co.fxtractes |
3 | Extract exponent & significant |
co.fxtractes(*e,*s, x)
1234.5678 = 1.2056326171875 * 210
fxtractes(1234.5678) =
|
|||||||||||||||||||||||||||||||||||||
setz |
1 | Returns +0.0 |
setz(x) = 0 returns 0 for any x |
|||||||||||||||||||||||||||||||||||||
set1 |
1 | Returns +1.0 |
set1(x) = 1 returns 1 for any x |
|||||||||||||||||||||||||||||||||||||
uplus | +x | 1 |
Unary plus |
+x = uplus(x) | ||||||||||||||||||||||||||||||||||||
chs | -x | 1 |
Reverse sign |
-x = chs(x) | ||||||||||||||||||||||||||||||||||||
abs | (|x|) | 1 |
Absolute value |
abs(x) ≡ (|x|) |
||||||||||||||||||||||||||||||||||||
nabs | (!x!) | 1 |
Negative absolute value |
nabs(x) = -abs(x) nabs(x) ≡ (!x!) |
||||||||||||||||||||||||||||||||||||
signbit sgnbit |
1:i | Sign bit of a number (0, 1) |
signbit(x) sgnbit(x) ♦ 1 ⇐ sign bit is set ♦ 0 ⇐ sign bit is reset
|
|||||||||||||||||||||||||||||||||||||
rsignbit rsgnbit |
1:i | Reversed sign bit of a number (0, 1) |
rsignbit(x) rsgnbit(x) ♦ 1 ⇐ sign bit is reset ♦ 0 ⇐ sign bit is set
|
|||||||||||||||||||||||||||||||||||||
sign sgn |
1 | Sign of a number (-1, 0, 1) |
sign(x) sgn(x) ♦ 1 ⇐ x > 0 ♦ 0 ⇐ x = 0 ♦ -1 ⇐ x < 0
|
|||||||||||||||||||||||||||||||||||||
rsign rsgn |
1 | Reversed sign of a number (-1, 0, 1) |
rsign(x) rsgn(x) ♦ 1 ⇐ x < 0 ♦ 0 ⇐ x = 0 ♦ -1 ⇐ x > 0 |
|||||||||||||||||||||||||||||||||||||
nzero |
!.x |
1 | Non-zero value |
nzero(x) !.x ♦ x ⇐ x != 0 ♦ +epsilon ⇐ x = +0 ♦ -epsilon ⇐ x = -0 epsilon = 2-1074 = 0x0000000000000001 |
||||||||||||||||||||||||||||||||||||
rnzero |
~!.x |
1 | Reversed non-zero value |
rnzero(x) ~!.x ♦ -x ⇐ x != 0 ♦ -epsilon ⇐ x = +0 ♦ +epsilon ⇐ x = -0 epsilon = 2-1074 = 0x0000000000000001 |
||||||||||||||||||||||||||||||||||||
pos ramp |
1 | Positive value or zero |
pos(x) ramp(x) ♦ x ⇐ x > 0 ♦ 0 ⇐ otherwise |
|||||||||||||||||||||||||||||||||||||
neg |
1 | Negative value or zero |
neg(x) ♦ x ⇐ x < 0 ♦ 0 ⇐ otherwise |
|||||||||||||||||||||||||||||||||||||
inc | 1 | Increment by 1 |
inc(x) |
|||||||||||||||||||||||||||||||||||||
dec | 1 | Decrement by 1 |
dec(x) |
|||||||||||||||||||||||||||||||||||||
inv recip |
/x |
1 | Inversion |
/x inv(x) recip(x) 1/x
|
||||||||||||||||||||||||||||||||||||
add |
+ |
2 | Addition |
add(x,y) x add y (add x,y) x + y
|
||||||||||||||||||||||||||||||||||||
add.pos |
++ |
2 | Positive addition |
add.pos(x,y) x ++ y ♦ x + y ⇐ x + y > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
add.neg |
+- |
2 | Negative addition |
add.neg(x,y) x +- y ♦ x + y ⇐ x + y < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
add.int |
[+] | 2 | Int addition |
add.int(x,y) x [+] y int(x) + int(y) |
||||||||||||||||||||||||||||||||||||
add.frac |
{+} | 2 | Frac addition |
add.frac(x,y) x {+} y frac(x) + frac(y) |
||||||||||||||||||||||||||||||||||||
add.round |
<+> | 2 | Round addition |
add.round(x,y) x <+> y round(x) + round(y) |
||||||||||||||||||||||||||||||||||||
sub |
- |
2 | Subtraction |
sub(x,y) x sub y (sub x,y) x - y
|
||||||||||||||||||||||||||||||||||||
sub.pos |
-+ |
2 | Positive subtraction |
sub.pos(x,y) x -+ y ♦ x - y ⇐ x - y > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
sub.neg |
-- |
2 | Negative subtraction |
sub.neg(x,y) x -- y ♦ x - y ⇐ x - y < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
sub.int |
[-] | 2 | Int subtraction |
sub.int(x,y) x [-] y int(x) - int(y) |
||||||||||||||||||||||||||||||||||||
sub.frac |
{-} | 2 | Frac subtraction |
sub.frac(x,y) x {-} y frac(x) - frac(y) |
||||||||||||||||||||||||||||||||||||
sub.round |
<-> | 2 | Round subtraction |
sub.round(x,y) x <-> y round(x) - round(y) |
||||||||||||||||||||||||||||||||||||
subr |
~- |
2 | Reverse subtraction |
subr(x,y) x subr y (subr x,y) x ~- y y - x
|
||||||||||||||||||||||||||||||||||||
subr.pos |
~-+ |
2 | Reverse positive subtraction |
sub.pos(x,y) x ~-+ y y -+ x ♦ y - x ⇐ y - x > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
subr.neg |
~-- |
2 | Reverse negative subtraction |
sub.neg(x,y) x ~-- y y -- x ♦ y - x ⇐ y - x < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
subr.int |
[~-] | 2 | Reverse int subtraction |
subr.int(x,y) x [~-] y y [-] x int(y) - int(x) |
||||||||||||||||||||||||||||||||||||
subr.frac |
{~-} | 2 | Reverse frac subtraction |
subr.frac(x,y) x {~-} y y {-} x frac(y) - frac(x) |
||||||||||||||||||||||||||||||||||||
subr.round |
<~-> | 2 | Reverse round subtraction |
subr.round(x,y) x <~-> y y <-> x round(y) - round(x) |
||||||||||||||||||||||||||||||||||||
mul |
* |
2 | Multiplication |
mul(x,y) x mul y (mul x,y) x * y
|
||||||||||||||||||||||||||||||||||||
mul.pos |
*+ |
2 | Positive multiplication |
mul.pos(x,y) x *+ y ♦ x * y ⇐ x * y > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
mul.neg |
*- |
2 | Negative multiplication |
mul.neg(x,y) x *- y ♦ x * y ⇐ x * y < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
mul.int |
[*] | 2 | Int multiplication |
mul.int(x,y) x [*] y int(x) * int(y) |
||||||||||||||||||||||||||||||||||||
mul.frac |
{*} | 2 | Frac multiplication |
mul.frac(x,y) x {*} y frac(x) * frac(y) |
||||||||||||||||||||||||||||||||||||
mul.round |
<*> | 2 | Round multiplication |
mul.round(x,y) x <*> y round(x) * round(y) |
||||||||||||||||||||||||||||||||||||
div |
/ |
2 | Division |
div(x,y) x div y (div x,y) x / y
|
||||||||||||||||||||||||||||||||||||
div.pos |
/+ |
2 | Positive division |
div.pos(x,y) x /+ y ♦ x / y ⇐ x / y > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
div.neg |
/- |
2 | Negative division |
div.neg(x,y) x /- y ♦ x / y ⇐ x / y < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
div.int |
[/] | 2 | Int division |
div.int(x,y) x [/] y int(x) / int(y) |
||||||||||||||||||||||||||||||||||||
div.frac |
{/} | 2 | Frac division |
div.frac(x,y) x {/} y frac(x) / frac(y) |
||||||||||||||||||||||||||||||||||||
div.round |
</> | 2 | Round division |
div.round(x,y) x </> y round(x) / round(y) |
||||||||||||||||||||||||||||||||||||
divr |
~/ |
2 | Reverse division |
divr(x,y) x divr y (divr x,y) x ~/ y y / x
|
||||||||||||||||||||||||||||||||||||
divr.pos |
~/+ |
2 | Reverse positive division |
divr.pos(x,y) x ~/+ y y /+ x ♦ y / x ⇐ y / x > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
divr.neg |
~/- |
2 | Reverse negaitive division |
divr.neg(x,y) x ~/- y y /- x ♦ y / x ⇐ y / x < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
divr.int |
[~/] | 2 | Reverse int division |
divr.int(x,y) x [~/] y y [/] x int(y) / int(x) |
||||||||||||||||||||||||||||||||||||
divr.frac |
{~/} | 2 | Reverse frac division |
divr.frac(x,y) x {~/} y y {/} x frac(y) / frac(x) |
||||||||||||||||||||||||||||||||||||
divr.round |
<~/> | 2 | Reverse round division |
divr.round(x,y) x <~/> y y </> x round(y) / round(x) |
||||||||||||||||||||||||||||||||||||
quo |
\ |
2 | Quotient |
quo(x,y) x quo y (quo x,y) x \ y int(x/y)
|
||||||||||||||||||||||||||||||||||||
quo.pos |
\+ |
2 | Positive quotient |
quo.pos(x,y) x \+ y ♦ x \ y ⇐ x \ y > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
quo.neg |
\- |
2 | Negative quotient |
quo.neg(x,y) x \- y ♦ x \ y ⇐ x \ y < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
quo.int |
[\] |
2 | Int quotient |
quo.int(x,y) x [\] y int(x) \ int(y) |
||||||||||||||||||||||||||||||||||||
quo.frac |
{\} |
2 | Frac quotient |
quo.frac(x,y) x {\} y frac(x) \ frac(y) |
||||||||||||||||||||||||||||||||||||
quo.round |
<\> |
2 | Round quotient |
quo.round(x,y) x <\> y round(x) \ round(y) |
||||||||||||||||||||||||||||||||||||
quor |
~\ |
2 | Reverse quotient |
quor(x,y) x quor y (quor x,y) x ~\ y y \ x int(y/x)
|
||||||||||||||||||||||||||||||||||||
quor.pos |
~\+ |
2 | Reverse positive quotient |
quor.pos(x,y) x ~\+ y y \+ x ♦ y \ x ⇐ y \ x > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
quor.neg |
~\- |
2 | Reverse negaitive quotient |
quor.neg(x,y) x ~\- y y \- x ♦ y \ x ⇐ y \ x < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
quor.int |
[~\] |
2 | Reverse int quotient |
quor.int(x,y) x [~\] y y [\] x int(y) \ int(x) |
||||||||||||||||||||||||||||||||||||
quor.frac |
{~\} |
2 | Reverse frac quotient |
quor.frac(x,y) x {~\} y y {\} x frac(y) \ frac(x) |
||||||||||||||||||||||||||||||||||||
quor.round |
<~\> |
2 | Reverse round quotient |
quor.round(x,y) x <~\> y y <\> x round(y) \ round(x) |
||||||||||||||||||||||||||||||||||||
mod |
% |
2 | Remainder |
mod(x,y) x mod y (mod x,y) x % y
|
||||||||||||||||||||||||||||||||||||
mod.pos |
%+ |
2 | Positive remainder |
mod.pos(x,y) x %+ y ♦ x % y ⇐ x % y > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
mod.neg |
%- |
2 | Negative remainder |
mod.neg(x,y) x %- y ♦ x % y ⇐ x % y < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
mod.int |
[%] |
2 | Int remainder |
mod.int(x,y) x [%] y int(x) % int(y) |
||||||||||||||||||||||||||||||||||||
mod.frac |
{%} |
2 | Frac remainder |
mod.frac(x,y) x {%} y frac(x) % frac(y) |
||||||||||||||||||||||||||||||||||||
mod.round |
<%> |
2 | Round remainder |
mod.round(x,y) x <%> y round(x) % round(y) |
||||||||||||||||||||||||||||||||||||
modr |
~% |
2 | Reverse remainder |
modr(x,y) x modr y (modr x,y) x ~% y y % x
|
||||||||||||||||||||||||||||||||||||
modr.pos |
~%+ |
2 | Reverse positive remainder |
modr.pos(x,y) x ~%+ y y %+ x ♦ y % x ⇐ y % x > 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
modr.neg |
~%- |
2 | Reverse negaitive remainder |
modr.neg(x,y) x ~%- y y %- x ♦ y % x ⇐ y % x < 0 ♦ 0 ⇐ otherwise |
||||||||||||||||||||||||||||||||||||
modr.int |
[~%] |
2 | Reverse int remainder |
modr.int(x,y) x [~%] y y [%] x int(y) % int(x) |
||||||||||||||||||||||||||||||||||||
modr.frac |
{~%} |
2 | Reverse frac remainder |
modr.frac(x,y) x {~%} y y {%} x frac(y) % frac(x) |
||||||||||||||||||||||||||||||||||||
modr.round |
<~%> |
2 | Reverse round remainder |
modr.round(x,y) x <~%> y y <%> x round(y) % round(x) |
||||||||||||||||||||||||||||||||||||
quo.mod |
\% |
2:2 |
Quotient and remainder |
quo.mod(x,y) = (quo,mod) quo = int(x / y) mod = x - y * int(x / y)
|
||||||||||||||||||||||||||||||||||||
co.quo.mod |
4 |
Quotient and remainder |
co.quo.mod(*quo,*mod, x,y) quo = int(x / y) mod = x - y * int(x / y)
|
|||||||||||||||||||||||||||||||||||||
mod.quo |
%\ |
2:2 |
Remainder and quotient |
mod.quo(x,y) = (mod,quo) mod = x - y * int(x / y) quo = int(x / y)
|
||||||||||||||||||||||||||||||||||||
co.mod.quo |
4 |
Remainder and quotient |
co.mod.quo(*mod,*quo, x,y) mod = x - y * int(x / y) quo = int(x / y)
|
|||||||||||||||||||||||||||||||||||||
fmadd132 |
3 |
Fused multiply-add |
fmadd132(x,y,z) x * z + y |
|||||||||||||||||||||||||||||||||||||
fmadd213 |
3 |
Fused multiply-add |
fmadd213(x,y,z) x * y + z |
|||||||||||||||||||||||||||||||||||||
fmadd231 |
3 |
Fused multiply-add |
fmadd231(x,y,z) y * z + x |
|||||||||||||||||||||||||||||||||||||
fnmadd132 |
3 |
Fused negative multiply-add |
fnmadd132(x,y,z) -x * z + y |
|||||||||||||||||||||||||||||||||||||
fnmadd213 |
3 |
Fused negative multiply-add |
fnmadd213(x,y,z) -x * y + z |
|||||||||||||||||||||||||||||||||||||
fnmadd231 |
3 |
Fused negative multiply-add |
fnmadd231(x,y,z) -y * z + x |
|||||||||||||||||||||||||||||||||||||
fmsub132 |
3 |
Fused multiply-subtract |
fmsub132(x,y,z) x * z - y |
|||||||||||||||||||||||||||||||||||||
fmsub213 |
3 |
Fused multiply-subtract |
fmsub213(x,y,z) x * y - z |
|||||||||||||||||||||||||||||||||||||
fmsub231 |
3 |
Fused multiply-subtract |
fmsub231(x,y,z) y * z - x |
|||||||||||||||||||||||||||||||||||||
fnmsub132 |
3 |
Fused negative multiply-subtract |
fnmsub132(x,y,z) -x * z - y |
|||||||||||||||||||||||||||||||||||||
fnmsub213 |
3 |
Fused negative multiply-subtract |
fnmsub213(x,y,z) -x * y - z |
|||||||||||||||||||||||||||||||||||||
fnmsub231 |
3 |
Fused negative multiply-subtract |
fnmsub231(x,y,z) -y * z - x |
|||||||||||||||||||||||||||||||||||||
add.mul |
3 | add & mul |
add.mul(z,x,y) z + x * y |
|||||||||||||||||||||||||||||||||||||
add.div |
3 | add & div |
add.div(z,x,y) z + x / y |
|||||||||||||||||||||||||||||||||||||
add.divr |
3 | add & divr |
add.divr(z,x,y) z + y / x |
|||||||||||||||||||||||||||||||||||||
sub.mul |
3 | sub & mul |
sub.mul(z,x,y) z - x * y |
|||||||||||||||||||||||||||||||||||||
sub.div |
3 | sub & div |
sub.div(z,x,y) z - x / y |
|||||||||||||||||||||||||||||||||||||
sub.divr |
3 | sub & divr |
sub.divr(z,x,y) z - y / x |
|||||||||||||||||||||||||||||||||||||
subr.mul |
3 | subr & mul |
subr.mul(z,x,y) x * y - z |
|||||||||||||||||||||||||||||||||||||
subr.div |
3 | subr & div |
subr.div(z,x,y) x / y - z |
|||||||||||||||||||||||||||||||||||||
subr.divr |
3 | subr & divr |
subr.divr(z,x,y) y / x - z |
|||||||||||||||||||||||||||||||||||||
mul.add |
3 | mul & add |
mul.add(x,y,z) x * y + z |
|||||||||||||||||||||||||||||||||||||
mul.sub |
3 | mul & sub |
mul.sub(x,y,z) x * y - z |
|||||||||||||||||||||||||||||||||||||
mul.subr |
3 | mul & subr |
mul.subr(x,y,z) z - x * y |
|||||||||||||||||||||||||||||||||||||
div.add |
3 | div & add |
div.add(x,y,z) x / y + z |
|||||||||||||||||||||||||||||||||||||
div.sub |
3 | div & sub |
div.sub(x,y,z) x / y - z |
|||||||||||||||||||||||||||||||||||||
div.subr |
3 | div & subr |
div.subr(x,y,z) z - x / y |
|||||||||||||||||||||||||||||||||||||
divr.add |
3 | divr & add |
divr.add(x,y,z) y / x + z |
|||||||||||||||||||||||||||||||||||||
divr.sub |
3 | divr & sub |
divr.sub(x,y,z) y / x - z |
|||||||||||||||||||||||||||||||||||||
divr.subr |
3 | divr & subr |
divr.subr(x,y,z) z - y / x |
|||||||||||||||||||||||||||||||||||||
trunc |
1:i |
Integer part of x |
integer trunc(x)
|
|||||||||||||||||||||||||||||||||||||
int |
[x] | 1 | Integer part of x |
int(x) [x]
|
||||||||||||||||||||||||||||||||||||
intto |
[x,n] | 2 |
Trunc x to a specified power of ten |
intto(x,n) [x,n]
|
||||||||||||||||||||||||||||||||||||
deintto |
2 | intto delta |
deintto(x,n) = x - intto(x,n) |
|||||||||||||||||||||||||||||||||||||
frac | {x} | 1 | Fractional part of x |
frac(x) {x}
|
||||||||||||||||||||||||||||||||||||
fracto |
{x,n} | 2 |
Frac x to a specified power of ten |
fracto(x,n) {x,n}
|
||||||||||||||||||||||||||||||||||||
defracto |
2 | fracto delta |
defracto(x,n) = x - fracto(x,n) |
|||||||||||||||||||||||||||||||||||||
round |
<x> | 1 |
Round x to the nearest integer number. Round half away from zero |
round(x) <x>
|
||||||||||||||||||||||||||||||||||||
deround |
1 | round delta |
deround(x) = x - round(x) |
|||||||||||||||||||||||||||||||||||||
roundto |
<x,n> | 2 |
Round x to a specified power of ten |
roundto(x,n) <x,n>
|
||||||||||||||||||||||||||||||||||||
deroundto |
2 | roundto delta |
deroundto(x,n) = x - roundto(x,n) |
|||||||||||||||||||||||||||||||||||||
rint frndint |
1 |
Round to integer. Depends on the current FPU rounding mode |
rint(x) frndint(x) |
|||||||||||||||||||||||||||||||||||||
rheven |
1 |
Round x to the nearest integer number. Round half to even |
rheven(x)
|
|||||||||||||||||||||||||||||||||||||
derheven |
1 | rheven delta |
derheven(x) = x - rheven(x) |
|||||||||||||||||||||||||||||||||||||
rhodd |
1 |
Round x to the nearest integer number. Round half to odd |
rhodd(x)
|
|||||||||||||||||||||||||||||||||||||
derhodd |
1 | rhodd delta |
derhodd(x) = x - rhodd(x) |
|||||||||||||||||||||||||||||||||||||
rzero |
1 |
Round x toward zero |
rzero(x)
|
|||||||||||||||||||||||||||||||||||||
derzero |
1 | rzero delta |
derzero(x) = x - rzero(x) |
|||||||||||||||||||||||||||||||||||||
rinf |
1 |
Round x toward infinity |
rinf(x)
|
|||||||||||||||||||||||||||||||||||||
derinf |
1 | rinf delta |
derinf(x) = x - rinf(x) |
|||||||||||||||||||||||||||||||||||||
rpinf ceil |
1 |
Round x toward +infinity Smallest integer ≥ x |
rpinf(x) ceil(x)
|
|||||||||||||||||||||||||||||||||||||
derpinf deceil |
1 | rpinf delta |
derpinf(x) = x - rpinf(x) deceil(x) = x - ceil(x) |
|||||||||||||||||||||||||||||||||||||
rninf floor |
1 |
Round x toward -infinity Largest integer ≤ x |
rninf(x) floor(x)
|
|||||||||||||||||||||||||||||||||||||
derninf defloor |
1 | rninf delta |
derninf(x) = x - rninf(x) defloor(x) = x - floor(x) |
|||||||||||||||||||||||||||||||||||||
avg mean |
|A| |+| |
2 | Arithmetic average of two values |
avg(x,y) mean(x,y) x |A| y x |+| y (x + y) / 2 |
||||||||||||||||||||||||||||||||||||
gavg gmean |
|G| |*| |
2 | Geometric average of two values |
gavg(x,y) gmean(x,y) x |G| y x |*| y (x * y)1/2 |
||||||||||||||||||||||||||||||||||||
havg hmean |
|H| |/| |
2 | Harmonic average of two values |
havg(x,y) hmean(x,y) x |H| y x |/| y 2 / (1/x + 1/y) 2 * x * y / (x + y) |
||||||||||||||||||||||||||||||||||||
chavg chmean |
|C| |\| |
2 | Contraharmonic average of two values |
chavg(x,y) chmean(x,y) x |C| y x |\| y (x2 + y2) / (x + y) |
||||||||||||||||||||||||||||||||||||
qavg qmean |
|Q| |
2 | Quadratic average of two values |
qavg(x,y) qmean(x,y) x |Q| y ((x2 + y2) / 2)1/2 |
||||||||||||||||||||||||||||||||||||
heavg hemean |
|h| |
2 | Heronian average of two values |
heavg(x,y) hemean(x,y) x |h| y (1/3) * (x + (x * y)1/2 + y) |
||||||||||||||||||||||||||||||||||||
ceavg cemean |
|c| |
2 | Centroidal average of two values |
ceavg(x,y) cemean(x,y) x |c| y (2/3) * (x2 + x * y + y2) / (x + y) |
||||||||||||||||||||||||||||||||||||
min |
?< |
2 | The smaller of two values |
min(x,y) x ?< y |
||||||||||||||||||||||||||||||||||||
max |
?> |
2 | The larger of two values |
max(x,y) x ?> y |
||||||||||||||||||||||||||||||||||||
minmax |
?<> |
2:2 | The smaller and the larger of two values |
minmax(x,y) x ?<> y (min,max)
|
||||||||||||||||||||||||||||||||||||
co.minmax |
4 |
The smaller and the larger of two values |
co.minmax(*min,*max, x,y)
|
|||||||||||||||||||||||||||||||||||||
maxmin |
?>< |
2:2 | The larger and the smaller of two values |
maxmin(x,y) x ?>< y (max,min)
|
||||||||||||||||||||||||||||||||||||
co.maxmin |
4 |
The larger and the smaller of two values |
co.maxmin(*max,*min, x,y)
|
|||||||||||||||||||||||||||||||||||||
adev |
2 |
Absolute deviation |
adev(x,y) abs(x-y) |
|||||||||||||||||||||||||||||||||||||
nadev |
2 |
Negative absolute deviation |
nadev(x,y) -abs(x-y) nabs(x-y) |
|||||||||||||||||||||||||||||||||||||
min.adev |
3 |
The smaller absolute deviation. |
min.adev(x1,x2, a)
returns:
|
|||||||||||||||||||||||||||||||||||||
minl.adev |
3 |
The value of the argument with the smaller absolute deviation. Prefer argument with a lower index |
minl.adev(x1,x2, a) deviationi = abs(a-xi)
|
|||||||||||||||||||||||||||||||||||||
minh.adev |
3 |
The value of the argument with the smaller absolute deviation. Prefer argument with a higher index |
minh.adev(xx1,x2, a) deviationi = abs(a-xi)
|
|||||||||||||||||||||||||||||||||||||
max.adev |
3 |
The larger absolute deviation. |
max.adev(x1,x2, a)
returns:
|
|||||||||||||||||||||||||||||||||||||
maxl.adev |
3 |
The value of the argument with the larger absolute deviation. Prefer argument with a lower index |
maxl.adev(x1,x2, a) deviationi = abs(a-xi)
|
|||||||||||||||||||||||||||||||||||||
maxh.adev |
3 |
The value of the argument with the larger absolute deviation. Prefer argument with a higher index |
maxh.adev(x1,x2, a) deviationi = abs(a-xi)
|
|||||||||||||||||||||||||||||||||||||
xsigny |
2 |
The magnitude of x and the sign of y. The zero sign is considered positive |
xsigny(x,y) ♦ xsigny(2,-1) = -2 xsigny(2, 1) = 2 xsigny(2, 0) = 2 |
|||||||||||||||||||||||||||||||||||||
ysignx |
2 |
The magnitude of y and the sign of x. The zero sign is considered positive |
ysignx(x,y) ♦ ysignx(-1,2) = -2 ysignx( 1,2) = 2 ysignx( 0,2) = 2 |
|||||||||||||||||||||||||||||||||||||
xcosign |
2 |
The magnitude of x and the sign of sign(x)*sign(y). The zero sign is considered positive |
xcosign(x,y) ♦ xcosign( 2,-1) = -2 xcosign( 2, 1) = 2 xcosign( 2, 0) = 2 xcosign(-2,-1) = 2 xcosign(-2, 1) = -2 xcosign(-2, 0) = -2 |
|||||||||||||||||||||||||||||||||||||
ycosign |
2 |
The magnitude of y and the sign of sign(x)*sign(y). The zero sign is considered positive |
ycosign(x,y) ♦ ycosign(-1, 2) = -2 ycosign( 1, 2) = 2 ycosign( 0, 2) = 2 ycosign(-1,-2) = 2 ycosign( 1,-2) = -2 ycosign( 0,-2) = -2 |
|||||||||||||||||||||||||||||||||||||
clamp |
3 | Clamp x in range between min and max |
clamp(x,min,max) clamp(x,max,min) ♦ max ⇐ x > max ♦ min ⇐ x < min ♦ x ⇐ otherwise clamp( 15,1,5) = 5 clamp( 15,5,1) = 5 clamp(-15,1,5) = 1 clamp(-15,5,1) = 1 clamp(1.5,1,5) = 1.5 clamp(1.5,5,1) = 1.5 |
|||||||||||||||||||||||||||||||||||||
saturate |
1 | Clamp x in range between 0 and 1 |
saturate(x) ♦ 1 ⇐ x > 1 ♦ 0 ⇐ x < 0 ♦ x ⇐ otherwise saturate( 50) = 1 saturate(-50) = 0 saturate(0.5) = 0.5 |
|||||||||||||||||||||||||||||||||||||
lineco |
4:2 |
Coefficients of linear function passing through the points
(x1,y1) and (x2,y2) |
lineco(x1,y1, x2,y2) = (a,b) y = a*x + b
// y = 2*x
// y = -x + 2
// y = -2*x + 4
// y = 0.0025*x - 5.12
|
|||||||||||||||||||||||||||||||||||||
co.lineco |
6 |
Coefficients of linear function passing through the points
(x1,y1) and (x2,y2) |
co.lineco(*a,*b, x1,y1, x2,y2) y = a*x + b
// y = 2*x
// y = -x + 2
// y = -2*x + 4
// y = 0.0025*x - 5.12
|
|||||||||||||||||||||||||||||||||||||
rescale |
5 | Rescale x |
rescale(x, x1,y1, x2,y2)
returns:
f(0, 0,-5.12, 4096,5.12) = -5.12 |
|||||||||||||||||||||||||||||||||||||
resclip |
5 | Rescale x with clipping |
resclip(x, x1,y1, x2,y2)
returns:
f(0, 0,-5.12, 4096,5.12) = -5.12 |
|||||||||||||||||||||||||||||||||||||
delta | 2 | Delta function |
delta(x,a) = ♦ 1 ⇐ x = a ♦ 0 ⇐ x ≠ a |
|||||||||||||||||||||||||||||||||||||
deltab | 3 | Deltab function |
deltab(x,a,b) ♦ 1 ⇐ (x ≥ a) and (x ≤ b) ♦ 0 ⇐ otherwise |
|||||||||||||||||||||||||||||||||||||
teta | 2 | Teta function |
teta(x,a) ♦ 1 ⇐ x > a ♦ 0 ⇐ x ≤ a |
|||||||||||||||||||||||||||||||||||||
tetae | 2 | Tetae function |
tetae(x,a) ♦ 1 ⇐ x ≥ a ♦ 0 ⇐ x < a |
|||||||||||||||||||||||||||||||||||||
cycle | 3 | Cycle function |
cycle(x,a,P) period = P returns: ♦ P + (x-a) mod P ⇐ x-a < 0 ♦ (x-a) mod P ⇐ x-a ≥ 0 ♦ 0 ⇐ P ≤ 0 |
|||||||||||||||||||||||||||||||||||||
gcd hcf |
2 |
Greatest common divisor Highest common factor |
gcd(12,21) = 3 gcd(24,54) = 6 gcd(51,17) = 17
|
|||||||||||||||||||||||||||||||||||||
lcm | 2 |
Least common multiple |
lcm(16,20) = 80 lcm(21,49) = 147 lcm(36,14) = 252
|
|||||||||||||||||||||||||||||||||||||
Exponential functions | ||||||||||||||||||||||||||||||||||||||||
exp |
1 |
Exponential function ex |
exp(x) |
|||||||||||||||||||||||||||||||||||||
exp2 pow2x |
1 |
2 raised to a power of x 2x |
exp2(x) pow2x(x) |
|||||||||||||||||||||||||||||||||||||
exp10 pow10x |
1 |
10 raised to a power of x 10x |
exp10(x) pow10x(x) |
|||||||||||||||||||||||||||||||||||||
ln loge |
1 |
Natural logarithm logex |
ln(x) loge(x) |
|||||||||||||||||||||||||||||||||||||
lb log2 |
1 |
Base-2 logarithm log2x |
lb(x) log2(x) |
|||||||||||||||||||||||||||||||||||||
lg log10 |
1 |
Base-10 logarithm log10x |
lg(x) log10(x) |
|||||||||||||||||||||||||||||||||||||
logn |
2 |
Base-n logarithm lognx |
logn(n,x) |
|||||||||||||||||||||||||||||||||||||
lognr |
2 |
Reverse base-n logarithm lognx |
lognr(x,n) logn(n,x) |
|||||||||||||||||||||||||||||||||||||
Power functions | ||||||||||||||||||||||||||||||||||||||||
pow power |
^ ** |
2 |
Power function xy |
pow(x,y) x ^ y x ** y
|
||||||||||||||||||||||||||||||||||||
apow apower |
2 |
Power function |x|y |
apow(x,y) pow(abs(x),y) |
|||||||||||||||||||||||||||||||||||||
powr powerr |
~^ ~** |
2 |
Reverse power function yx |
powr(x,y) x ~^ y x ~** y |
||||||||||||||||||||||||||||||||||||
apowr apowerr |
2 |
Reverse power function |y|x |
apowr(x,y) powr(x,abs(y)) |
|||||||||||||||||||||||||||||||||||||
ipow ipower |
2 |
Integer power function xn |
double ipow (double x, integer n) ipow(x,n)
|
|||||||||||||||||||||||||||||||||||||
sqr pow2 |
1 |
Square power x2 |
sqr(x) pow2(x) |
|||||||||||||||||||||||||||||||||||||
cube pow3 |
1 |
Cube power x3 |
cube(x) pow3(x) |
|||||||||||||||||||||||||||||||||||||
pow4 |
1 |
Power-4 function x4 |
pow4(x) |
|||||||||||||||||||||||||||||||||||||
root |
*/ | 2 |
Root function x1/y |
root(x,y) x */ y |
||||||||||||||||||||||||||||||||||||
rootr |
~*/ | 2 |
Reverse root function y1/x |
rootr(x,y) x ~*/ y |
||||||||||||||||||||||||||||||||||||
sqrt root2 |
1 |
Square root Root-2 function x1/2 |
sqrt(x) root2(x) |
|||||||||||||||||||||||||||||||||||||
cbrt root3 |
1 |
Cubic root Root-3 function x1/3 |
cbrt(x) root3(x) |
|||||||||||||||||||||||||||||||||||||
root4 |
1 |
Root-4 function x1/4 |
root4(x) |
|||||||||||||||||||||||||||||||||||||
hypot hyp |
2 3 |
Hypotenuse (pythagoras) (x2 + y2)1/2 (x2 + y2 + z2)1/2 |
hypot(x,y[,z]) hyp(x,y[,z])
|
|||||||||||||||||||||||||||||||||||||
hypot3 hyp3 |
3 |
(x2 + y2 + z2)1/2 |
hypot3(x,y,z) hyp3(x,y,z)
|
|||||||||||||||||||||||||||||||||||||
Trigonometric functions | ||||||||||||||||||||||||||||||||||||||||
sin | 1 |
Sine |x| < 263 |
||||||||||||||||||||||||||||||||||||||
cos | 1 |
Cosine |x| < 263 |
||||||||||||||||||||||||||||||||||||||
sec | 1 |
Secant |x| < 263 |
1/cos(x) | |||||||||||||||||||||||||||||||||||||
csc cosec |
1 |
Cosecant |x| < 263 |
1/sin(x) | |||||||||||||||||||||||||||||||||||||
tg tan |
1 |
Tangent |x| < 263 |
||||||||||||||||||||||||||||||||||||||
ctg cot cotan |
1 |
Cotangent |x| < 263 |
||||||||||||||||||||||||||||||||||||||
sincos | 1:2 |
Sine and cosine |x| < 263 |
sincos(x) (sin(x),cos(x))
|
|||||||||||||||||||||||||||||||||||||
co.sincos | 3 |
Sine and cosine |x| < 263 |
co.sincos(*sin,*cos, x)
|
|||||||||||||||||||||||||||||||||||||
cossin | 1:2 |
Cosine and sine |x| < 263 |
cossin(x) (cos(x),sin(x))
|
|||||||||||||||||||||||||||||||||||||
co.cossin | 3 |
Cosine and sine |x| < 263 |
co.cossin(*cos,*sin, x)
|
|||||||||||||||||||||||||||||||||||||
versin vers |
1 |
Versed sine |x| < 263 |
1 - cos(x) | |||||||||||||||||||||||||||||||||||||
vercos verc |
1 |
Versed cosine |x| < 263 |
1 + cos(x) | |||||||||||||||||||||||||||||||||||||
coversin covers cvs |
1 |
Coversed sine |x| < 263 |
1 - sin(x) | |||||||||||||||||||||||||||||||||||||
covercos coverc cvc |
1 |
Coversed cosine |x| < 263 |
1 + sin(x) | |||||||||||||||||||||||||||||||||||||
haversin havers hvs |
1 |
Haversed sine |x| < 263 |
(1 - cos(x))/2 | |||||||||||||||||||||||||||||||||||||
havercos haverc hvc |
1 |
Haversed cosine |x| < 263 |
(1 + cos(x))/2 | |||||||||||||||||||||||||||||||||||||
hacoversin hacovers hcs |
1 |
Hacoversed sine |x| < 263 |
(1 - sin(x))/2 | |||||||||||||||||||||||||||||||||||||
hacovercos hacoverc hcc |
1 |
Hacoversed cosine |x| < 263 |
(1 + sin(x))/2 | |||||||||||||||||||||||||||||||||||||
exsec |
1 |
Exsecant |x| < 263 |
sec(x) - 1 = 1/cos(x) - 1 | |||||||||||||||||||||||||||||||||||||
excsc excosec |
1 |
Excosecant |x| < 263 |
csc(x) - 1 = 1/sin(x) - 1 | |||||||||||||||||||||||||||||||||||||
asin arcsin |
1 | Inverse sine | ||||||||||||||||||||||||||||||||||||||
acos arccos |
1 | Inverse cosine | ||||||||||||||||||||||||||||||||||||||
asec arcsec |
1 | Inverse secant | ||||||||||||||||||||||||||||||||||||||
acsc acosec arccsc arccosec |
1 | Inverse cosecant | ||||||||||||||||||||||||||||||||||||||
atan arctg arctan |
1 | Inverse tangent | ||||||||||||||||||||||||||||||||||||||
atan2 arctg2 arctan2 |
2 | Inverse tangent of y/x |
atan2(y,x) arctg2(y,x) arctan2(y,x) |
|||||||||||||||||||||||||||||||||||||
atan2r arctg2r arctan2r |
2 | Inverse tangent of y/x |
atan2r(x,y) arctg2r(x,y) arctan2r(x,y) |
|||||||||||||||||||||||||||||||||||||
acot acotan arcctg arccot arccotan |
1 | Inverse cotangent | ||||||||||||||||||||||||||||||||||||||
Hyperbolic functions | ||||||||||||||||||||||||||||||||||||||||
sh sinh |
1 | Hyperbolic sine |
sh(x) sinh(x) (ex - e-x)/2 |
|||||||||||||||||||||||||||||||||||||
ch cosh |
1 | Hyperbolic cosine |
ch(x) cosh(x) (ex + e-x)/2 |
|||||||||||||||||||||||||||||||||||||
sch sech |
1 | Hyperbolic secant |
sch(x) sech(x) 1/ch(x) |
|||||||||||||||||||||||||||||||||||||
csh csch cosech |
1 | Hyperbolic cosecant |
csh(x) csch(x) cosech(x) 1/sh(x) |
|||||||||||||||||||||||||||||||||||||
th tanh |
1 | Hyperbolic tangent | ||||||||||||||||||||||||||||||||||||||
cth coth cotanh |
1 | Hyperbolic cotangent | ||||||||||||||||||||||||||||||||||||||
shch |
1:2 | Hyperbolic sine and cosine |
shch(x) (sh(x),ch(x))
|
|||||||||||||||||||||||||||||||||||||
co.shch |
3 | Hyperbolic sine and cosine |
co.shch(*sh,*ch, x)
|
|||||||||||||||||||||||||||||||||||||
chsh |
1:2 | Hyperbolic cosine and sine |
chsh(x) (ch(x),sh(x))
|
|||||||||||||||||||||||||||||||||||||
co.chsh |
3 | Hyperbolic cosine and sine |
co.chsh(*ch,*sh, x)
|
|||||||||||||||||||||||||||||||||||||
arsh asinh |
1 | Inverse hyperbolic sine | ||||||||||||||||||||||||||||||||||||||
arch acosh |
1 | Inverse hyperbolic cosine | ||||||||||||||||||||||||||||||||||||||
arsch asech |
1 | Inverse hyperbolic secant | ||||||||||||||||||||||||||||||||||||||
arcsh acsch acosech |
1 | Inverse hyperbolic cosecant | ||||||||||||||||||||||||||||||||||||||
arth atanh |
1 | Inverse hyperbolic tangent | ||||||||||||||||||||||||||||||||||||||
arcth acoth acotanh |
1 | Inverse hyperbolic cotangent | ||||||||||||||||||||||||||||||||||||||
Complex number functions | ||||||||||||||||||||||||||||||||||||||||
z = (r,θ) = r • ei•θ z = (a,b) = a + i•b z = (c,d) = c + i•d z = (x,y) = x + i•y |
||||||||||||||||||||||||||||||||||||||||
ccovalue |
2:2 |
The value of the complex variable it had at compile time |
ccovalue(z) ccovalue(z.re, z.im)
|
|||||||||||||||||||||||||||||||||||||
crestore |
2:2 |
Copy covalue to the variable Return complex |
crestore(z) crestore(z.re, z.im)
|
|||||||||||||||||||||||||||||||||||||
creset |
2:0 |
Copy covalue to the variable Return void |
creset(z) creset(z.re, z.im)
|
|||||||||||||||||||||||||||||||||||||
ccopy |
x= x:= |
4:2 |
Copy complex to complex Return complex |
ccopy(*a,*b, c,d) = (a',b') a, b - double variables a := c b := d a' = c b' = d
|
||||||||||||||||||||||||||||||||||||
cmove |
4:0 |
Copy complex to complex Return void |
cmove(*a,*b, c,d) = ∅ a, b - double variables a := c b := d
|
|||||||||||||||||||||||||||||||||||||
cpcopy |
3:2 |
Copy complex to complex Indirect Return complex |
cpcopy(p, a,b) = (a,b) p - integer variable or pointer p = address of T_complex structure p.re := a p.im := b
|
|||||||||||||||||||||||||||||||||||||
cpmove |
3:0 |
Copy complex to complex Indirect Return void |
cpmove(p, a,b) = ∅ p - integer variable or pointer p = address of T_complex structure p.re := a p.im := b
|
|||||||||||||||||||||||||||||||||||||
cxcopy |
3:2 |
Copy x to complex.re and im Return complex |
cxcopy(*a,*b, x) = (a',b') a, b - double variables a := x b := x a' = x b' = x
|
|||||||||||||||||||||||||||||||||||||
cxmove |
3:0 |
Copy x to complex.re and im Return void |
cxmove(*a,*b, x) = ∅ a, b - double variables a := x b := x
|
|||||||||||||||||||||||||||||||||||||
czcopy |
2:2 |
Copy 0 to complex.re and im Return complex |
czcopy(*a,*b) = (a',b') a, b - double variables a := 0 b := 0 a' = 0 b' = 0
|
|||||||||||||||||||||||||||||||||||||
czmove |
2:0 |
Copy 0 to complex.re and im Return void |
czmove(*a,*b) = ∅ a, b - double variables a := 0 b := 0
|
|||||||||||||||||||||||||||||||||||||
crrcopy |
4:2 |
Copy complex.re2 to complex.re1 Return complex |
crrcopy(*a,*b, c,d) = (a',b') a, b - double variables a := c a' = c b' = b
|
|||||||||||||||||||||||||||||||||||||
crrmove |
4:0 |
Copy complex.re2 to complex.re1 Return void |
crrmove(*a,*b, c,d) = ∅ a, b - double variables a := c
|
|||||||||||||||||||||||||||||||||||||
cxrcopy |
3:2 |
Copy x to complex.re Return complex |
cxrcopy(*a,*b, x) = (a',b') a, b - double variables a := x a' = x b' = b
|
|||||||||||||||||||||||||||||||||||||
cxrmove |
3:0 |
Copy x to complex.re Return void |
cxrmove(*a,*b, x) = ∅ a, b - double variables a := x
|
|||||||||||||||||||||||||||||||||||||
czrcopy |
2:2 |
Copy 0 to complex.re Return complex |
czrcopy(*a,*b) = (a',b') a, b - double variables a := 0 a' = 0 b' = b
|
|||||||||||||||||||||||||||||||||||||
czrmove |
2:0 |
Copy 0 to complex.re Return void |
czrmove(*a,*b) = ∅ a, b - double variables a := 0
|
|||||||||||||||||||||||||||||||||||||
ciicopy |
4:2 |
Copy complex.im2 to complex.im1 Return complex |
ciicopy(*a,*b, c,d) = (a',b') a, b - double variables b := d a' = a b' = d
|
|||||||||||||||||||||||||||||||||||||
ciimove |
4:0 |
Copy complex.im2 to complex.im1 Return void |
ciimove(*a,*b, c,d) = ∅ a, b - double variables b := d
|
|||||||||||||||||||||||||||||||||||||
cxicopy |
3:2 |
Copy x to complex.im Return complex |
cxicopy(*a,*b, x) = (a',b') a, b - double variables b := x a' = a b' = x
|
|||||||||||||||||||||||||||||||||||||
cximove |
3:0 |
Copy x to complex.im Return void |
cximove(*a,*b, x) = ∅ a, b - double variables b := x
|
|||||||||||||||||||||||||||||||||||||
czicopy |
2:2 |
Copy 0 to complex.im Return complex |
czicopy(*a,*b) = (a',b') a, b - double variables b := 0 a' = a b' = 0
|
|||||||||||||||||||||||||||||||||||||
czimove |
2:0 |
Copy 0 to complex.im Return void |
czimove(*a,*b) = ∅ a, b - double variables b := 0
|
|||||||||||||||||||||||||||||||||||||
cswap |
:=: |
4:2 |
Swap Return complex |
cswap(*a,*b, *c,*d) = (a',b') a, b - double variables c, d - double variables a :=: c b :=: d a' = c b' = d
|
||||||||||||||||||||||||||||||||||||
cswop |
4:0 |
Swop Return void |
cswop(*a,*b, *c,*d) = ∅ a, b - double variables c, d - double variables a :=: c b :=: d
|
|||||||||||||||||||||||||||||||||||||
cpolar |
2:2 |
Complex polar from plane |
cpolar(a,b) = (r,θ) r = (a2 + b2)1/2 θ = atan(b/a) -π < θ ≤ π
|
|||||||||||||||||||||||||||||||||||||
cplane |
2:2 |
Complex plane from polar |
cplane(r,θ) = (a,b) a = r•cos(θ) b = r•sin(θ)
|
|||||||||||||||||||||||||||||||||||||
creal |
2 |
Real part |
creal(a,b) = a |
|||||||||||||||||||||||||||||||||||||
cimag |
2 |
Imaginary part |
cimag(a,b) = b |
|||||||||||||||||||||||||||||||||||||
creze |
2:2 |
Real part and zero |
creze(a,b) = (a,0) |
|||||||||||||||||||||||||||||||||||||
czeim |
2:2 |
Zero and imaginary part |
czeim(a,b) = (0,b) |
|||||||||||||||||||||||||||||||||||||
czero |
2:2 |
Zero |
czero(a,b) = (0,0) |
|||||||||||||||||||||||||||||||||||||
cvoid |
2:0 |
Void |
cvoid(a,b) = ∅ |
|||||||||||||||||||||||||||||||||||||
crere |
4:2 |
Re1 + i•Re2 |
crere(a,b,c,d) = (a,c) |
|||||||||||||||||||||||||||||||||||||
creim |
4:2 |
Re1 + i•Im2 |
creim(a,b,c,d) = (a,d) |
|||||||||||||||||||||||||||||||||||||
cimre |
4:2 |
Im1 + i•Re2 |
cimre(a,b,c,d) = (b,c) |
|||||||||||||||||||||||||||||||||||||
cimim |
4:2 |
Im1 + i•Im2 |
cimim(a,b,c,d) = (b,d) |
|||||||||||||||||||||||||||||||||||||
cnorm |
2 |
Norm value |
cnorm(a,b) = a2 + b2 |
|||||||||||||||||||||||||||||||||||||
cnorms |
4:2 |
Norm values |
cnorms(a,b,c,d) = (n1,n2) n1 = a2 + b2 n2 = c2 + d2 |
|||||||||||||||||||||||||||||||||||||
cabs |
2 |
Absolute value |
cabs(a,b) = (a2 + b2)1/2 |
|||||||||||||||||||||||||||||||||||||
cabss |
4:2 |
Absolute values |
cabss(a,b,c,d) = (r1,r2) r1 = (a2 + b2)1/2 r2 = (c2 + d2)1/2 |
|||||||||||||||||||||||||||||||||||||
carg |
2 |
Argument |
carg(a,b) = atan(b/a) -π < carg(z) ≤ π |
|||||||||||||||||||||||||||||||||||||
cargs |
4:2 |
Arguments |
cargs(a,b,c,d) = (θ1,θ2) θ1 = atan(b/a) θ2 = atan(d/c) -π < θi ≤ π |
|||||||||||||||||||||||||||||||||||||
cconj |
2:2 |
Conjugate |
cconj(a,b) = (a,-b)
|
|||||||||||||||||||||||||||||||||||||
crconj |
2:2 |
Reversed conjugate |
crconj(a,b) = (-a,b)
|
|||||||||||||||||||||||||||||||||||||
cchs |
2:2 |
Change sign |
cchs(a,b) = (-a,-b)
|
|||||||||||||||||||||||||||||||||||||
cxch |
2:2 |
Exchange |
cxch(a,b) = (b,a)
|
|||||||||||||||||||||||||||||||||||||
ccis |
1:2 |
cos + i•sin |
ccis(x) = (a',b') a' = cos(x) b' = sin(x)
|
|||||||||||||||||||||||||||||||||||||
csign |
2:2 |
Normalized direction z/|z| |
csign(a,b) = (a',b') a' = a/r b' = b/r r = (a2 + b2)1/2
|
|||||||||||||||||||||||||||||||||||||
cprojd |
2:3 |
Projection on the Riemann sphere ξ2 + η2 + (ζ-1/2)2 = 1/4 Diameter = 1 |
cprojd(a,b) = (ξ,η,ζ)
|
|||||||||||||||||||||||||||||||||||||
cprojdx |
3:3 |
Projection on the Riemann sphere ξ2 + η2 + (ζ-D/2)2 = (D/2)2 Diameter = D |
cprojdx(a,b,D) = (ξ,η,ζ)
|
|||||||||||||||||||||||||||||||||||||
cprojr |
2:3 |
Projection on the Riemann sphere ξ2 + η2 + ζ2 = 1 Radius = 1 |
cprojr(a,b) = (ξ,η,ζ)
|
|||||||||||||||||||||||||||||||||||||
cprojrx |
3:3 |
Projection on the Riemann sphere ξ2 + η2 + ζ2 = R2 Radius = R |
cprojrx(a,b,R) = (ξ,η,ζ)
|
|||||||||||||||||||||||||||||||||||||
caprojd |
3:2 |
Complex plane from projection on the Riemann sphere ξ2 + η2 + (ζ-1/2)2 = 1/4 Diameter = 1 |
caprojd(ξ,η,ζ) = (a,b)
|
|||||||||||||||||||||||||||||||||||||
caprojdx |
4:2 |
Complex plane from projection on the Riemann sphere ξ2 + η2 + (ζ-D/2)2 = (D/2)2 Diameter = D |
caprojdx(ξ,η,ζ,D) = (a,b)
|
|||||||||||||||||||||||||||||||||||||
caprojr |
3:2 |
Complex plane from projection on the Riemann sphere ξ2 + η2 + ζ2 = 1 Radius = 1 |
caprojr(ξ,η,ζ) = (a,b)
|
|||||||||||||||||||||||||||||||||||||
caprojrx |
4:2 |
Complex plane from projection on the Riemann sphere ξ2 + η2 + ζ2 = R2 Radius = R |
caprojrx(ξ,η,ζ,R) = (a,b)
|
|||||||||||||||||||||||||||||||||||||
Complex number boolean functions | ||||||||||||||||||||||||||||||||||||||||
cequ |
4:i |
Equal |
cequ(a,b,c,d) ♦ 1 ⇐ (a = c) and (b = d) ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cnequ |
4:i |
Not equal |
cnequ(a,b,c,d) ♦ 1 ⇐ (a ≠ c) or (b ≠ d) ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
creal.equ |
4:i |
Real equal |
creal.equ(a,b,c,d) ♦ 1 ⇐ a = c ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
creal.nequ |
4:i |
Real not equal |
creal.nequ(a,b,c,d) ♦ 1 ⇐ a ≠ c ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cimag.equ |
4:i |
Imaginary equal |
cimag.equ(a,b,c,d) ♦ 1 ⇐ b = d ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cimag.nequ |
4:i |
Imaginary not equal |
cimag.nequ(a,b,c,d) ♦ 1 ⇐ b ≠ d ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cabs.equ |
4:i |
Abs equal |
cabs.equ(a,b,c,d) ♦ 1 ⇐ abs1 = abs2 ♦ 0 ⇐ othewise abs1 = (a2 + b2)1/2 abs2 = (c2 + d2)1/2
|
|||||||||||||||||||||||||||||||||||||
cabs.nequ |
4:i |
Abs not equal |
cabs.nequ(a,b,c,d) ♦ 1 ⇐ abs1 ≠ abs2 ♦ 0 ⇐ othewise abs1 = (a2 + b2)1/2 abs2 = (c2 + d2)1/2
|
|||||||||||||||||||||||||||||||||||||
carg.equ |
4:i |
Arg equal |
carg.equ(a,b,c,d) ♦ 1 ⇐ arg1 = arg2 ♦ 0 ⇐ othewise arg1 = atan(b/a) arg2 = atan(d/c)
|
|||||||||||||||||||||||||||||||||||||
carg.nequ |
4:i |
Arg not equal |
carg.nequ(a,b,c,d) ♦ 1 ⇐ arg1 ≠ arg2 ♦ 0 ⇐ othewise arg1 = atan(b/a) arg2 = atan(d/c)
|
|||||||||||||||||||||||||||||||||||||
cis.zero |
2:i |
Is zero |
cis.zero(a,b) ♦ 1 ⇐ (a = 0) and (b = 0) ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cisn.zero |
2:i |
Is not zero |
cisn.zero(a,b) ♦ 1 ⇐ (a ≠ 0) or (b ≠ 0) ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cis.real |
2:i |
Is purely real |
cis.real(a,b) ♦ 1 ⇐ b = 0 ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cisn.real |
2:i |
Is not purely real |
cisn.real(a,b) ♦ 1 ⇐ b ≠ 0 ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cis.imag |
2:i |
Is purely imaginary |
cis.imag(a,b) ♦ 1 ⇐ (a = 0) and (b ≠ 0) ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
cisn.imag |
2:i |
Is not purely imaginary |
cisn.imag(a,b) ♦ 1 ⇐ (a ≠ 0) or (b = 0) ♦ 0 ⇐ othewise
|
|||||||||||||||||||||||||||||||||||||
Complex number arithmetic functions | ||||||||||||||||||||||||||||||||||||||||
cadd |
+ | 4:2 |
Addition z1+z2 |
cadd(a,b,c,d) = (a',b') a' = a + c b' = b + d
|
||||||||||||||||||||||||||||||||||||
cradd |
3:2 |
Addition of real number z+c |
cradd(a,b,c) = (a',b') a' = a + c b' = b
|
|||||||||||||||||||||||||||||||||||||
ciadd |
3:2 |
Addition of imaginary number z+i•c |
ciadd(a,b,c) = (a',b') a' = a b' = b + c
|
|||||||||||||||||||||||||||||||||||||
cinc |
2:2 |
Addition of 1 z+1 |
cinc(a,b) = (a',b') a' = a + 1 b' = b
|
|||||||||||||||||||||||||||||||||||||
caddi cinci |
2:2 |
Addition of i z+i |
caddi(a,b) cinci = (a',b') a' = a b' = b + 1
|
|||||||||||||||||||||||||||||||||||||
csub |
- | 4:2 |
Subtraction z1-z2 |
csub(a,b,c,d) = (a',b') a' = a - c b' = b - d
|
||||||||||||||||||||||||||||||||||||
crsub |
3:2 |
Subtraction of real number z-c |
crsub(a,b,c) = (a',b') a' = a - c b' = b
|
|||||||||||||||||||||||||||||||||||||
cisub |
3:2 |
Subtraction of imaginary number z-i•c |
cisub(a,b,c) = (a',b') a' = a b' = b - c
|
|||||||||||||||||||||||||||||||||||||
cdec |
2:2 |
Subtraction of 1 z-1 |
cdec(a,b) = (a',b') a' = a - 1 b' = b
|
|||||||||||||||||||||||||||||||||||||
csubi cdeci |
2:2 |
Subtraction of i z-i |
csubi(a,b) cdeci = (a',b') a' = a b' = b - 1
|
|||||||||||||||||||||||||||||||||||||
csubr |
~- | 4:2 |
Reverse subtraction z2-z1 |
csubr(a,b,c,d) = (a',b') a' = c - a b' = d - b
|
||||||||||||||||||||||||||||||||||||
crsubr |
3:2 |
Reverse subtraction of real number c-z |
crsubr(a,b,c) = (a',b') a' = c - a b' = -b
|
|||||||||||||||||||||||||||||||||||||
cisubr |
3:2 |
Reverse subtraction of imaginary number i•c-z |
cisubr(a,b,c) = (a',b') a' = -a b' = c - b
|
|||||||||||||||||||||||||||||||||||||
cdecr |
2:2 |
Reverse subtraction of 1 1-z |
cdecr(a,b) = (a',b') a' = 1 - a b' = -b
|
|||||||||||||||||||||||||||||||||||||
csubri cdecri |
2:2 |
Reverse subtraction of i i-z |
csubri(a,b) cdecri = (a',b') a' = -a b' = 1 - b
|
|||||||||||||||||||||||||||||||||||||
cmul |
* | 4:2 |
Multiplication z1•z2 |
cmul(a,b,c,d) = (a',b') a' = a•c - b•d b' = a•d + b•c
|
||||||||||||||||||||||||||||||||||||
crmul |
3:2 |
Multiplication by real number z•c |
crmul(a,b,c) = (a',b') a' = a•c b' = b•c
|
|||||||||||||||||||||||||||||||||||||
cimul |
3:2 |
Multiplication by imaginary number z•i•c |
cimul(a,b,c) = (a',b') a' = -b•c b' = a•c
|
|||||||||||||||||||||||||||||||||||||
cmuli |
2:2 |
Multiplication by i z•i |
cmul(a,b) = (a',b') a' = -b b' = a
|
|||||||||||||||||||||||||||||||||||||
cdiv |
/ | 4:2 |
Division z1/z2 |
cdiv(a,b,c,d) = (a',b') a' = (a•c + b•d)/n b' = (b•c - a•d)/n n = c2 + d2
|
||||||||||||||||||||||||||||||||||||
crdiv |
3:2 |
Division by real number z/c |
crdiv(a,b,c) = (a',b') a' = a/c b' = b/c
|
|||||||||||||||||||||||||||||||||||||
cidiv |
3:2 |
Division by imaginary number z/(i•c) |
cidiv(a,b,c) = (a',b') a' = b/c b' = -a/c
|
|||||||||||||||||||||||||||||||||||||
cdivi |
2:2 |
Division by i z/i |
cdivi(a,b) = (a',b') a' = b b' = -a
|
|||||||||||||||||||||||||||||||||||||
cdivr |
~/ | 4:2 |
Reverse division z2/z1 |
cdivr(a,b,c,d) = (a',b') a' = (a•c + b•d)/n b' = (a•d - b•c)/n n = a2 + b2
|
||||||||||||||||||||||||||||||||||||
crdivr |
3:2 |
Reverse division by real number c/z |
crdivr(a,b,c) = (a',b') a' = a•c/n b' = -b•c/n n = a2 + b2
|
|||||||||||||||||||||||||||||||||||||
cidivr |
3:2 |
Reverse division by imaginary number (i•c)/z |
cidivr(a,b,c) = (a',b') a' = b•c/n b' = a•c/n n = a2 + b2
|
|||||||||||||||||||||||||||||||||||||
cinv crecip |
2:2 |
Reverse division by 1 1/z |
cinv(a,b) crecip = (a',b') a' = a/n b' = -b/n n = a2 + b2
|
|||||||||||||||||||||||||||||||||||||
cdivri cinvi crecipi |
2:2 |
Reverse division by i i/z |
cdivri(a,b) cinvi(a,b) crecipi = (a',b') a' = b/n b' = a/n n = a2 + b2
|
|||||||||||||||||||||||||||||||||||||
Complex number exponential functions | ||||||||||||||||||||||||||||||||||||||||
cexp |
2:2 |
Exponential function ez |
cexp(a,b) = (a',b') a' = r'•cos(t') b' = r'•sin(t') r' = ea t' = b
|
|||||||||||||||||||||||||||||||||||||
cexp2 cpow2z |
2:2 |
2 raised to a power of z 2z |
cexp2(a,b) = (a',b') a' = r'•cos(t') b' = r'•sin(t') r' = 2a t' = b•ln(2)
|
|||||||||||||||||||||||||||||||||||||
cexp10 cpow10z |
2:2 |
10 raised to a power of z 10z |
cexp10(a,b) = (a',b') a' = r'•cos(t') b' = r'•sin(t') r' = 10a t' = b•ln(10)
|
|||||||||||||||||||||||||||||||||||||
cln cloge |
2:2 |
Natural logarithm logez |
cln(a,b) cloge(a,b) = (a',b') a' = ln(r) b' = θ r = (a2 + b2)1/2 θ = atan(b/a)
|
|||||||||||||||||||||||||||||||||||||
clb clog2 |
2:2 |
Base-2 logarithm log2(z) |
clb(a,b) clog2(a,b) = (a',b') a' = log2e•ln(r) b' = log2e•θ r = (a2 + b2)1/2 θ = atan(b/a)
|
|||||||||||||||||||||||||||||||||||||
clg clog10 |
2:2 |
Base-10 logarithm log10(z) |
clg(a,b) clog10(a,b) = (a',b') a' = log10e•ln(r) b' = log10e•θ r = (a2 + b2)1/2 θ = atan(b/a)
|
|||||||||||||||||||||||||||||||||||||
clogn |
3:2 |
Base-n logarithm logn(z) |
clogn(n,a,b) = (a',b') a' = logne•ln(r) b' = logne•θ r = (a2 + b2)1/2 θ = atan(b/a)
|
|||||||||||||||||||||||||||||||||||||
clognr |
3:2 |
Reverse base-n logarithm logn(z) |
clognr(a,b,n) = (a',b') a' = logne•ln(r) b' = logne•θ r = (a2 + b2)1/2 θ = atan(b/a)
|
|||||||||||||||||||||||||||||||||||||
Complex number power functions | ||||||||||||||||||||||||||||||||||||||||
cpow |
^ ** |
4:2 |
Power function z1z2 |
cpow(z1,z2) cpow(a,b,c,d) z1z2 = ez2•ln(z1)
|
||||||||||||||||||||||||||||||||||||
cpowr |
~^ ~** |
4:2 |
Reverse power function z2z1 |
cpowr(z1,z2) cpowr(a,b,c,d) z2z1 = ez1•ln(z2)
|
||||||||||||||||||||||||||||||||||||
cxpow |
3:2 |
Power function xz |
cxpow(x,a,b) = (a',b') a' = r'•cos(t') b' = r'•sin(t') r' = xa t' = b•ln(x)
|
|||||||||||||||||||||||||||||||||||||
cpowx |
3:2 |
Power function zx |
cpowx(a,b,x) zx = ex•ln(z) x - double value
|
|||||||||||||||||||||||||||||||||||||
cpown |
3:2 |
Power function zn |
cpown(a,b,n) n - integer value
|
|||||||||||||||||||||||||||||||||||||
cpow2 csqr |
2:2 |
Square power z2 |
cpow2(a,b) csqr(a,b) = (a',b') a' = a2 - b2 b' = 2•a•b
|
|||||||||||||||||||||||||||||||||||||
cpow3 ccube |
2:2 |
Cube power z3 |
cpow3(a,b) ccube(a,b)
|
|||||||||||||||||||||||||||||||||||||
cpow4 |
2:2 |
Power-4 function z4 |
cpow4(a,b)
|
|||||||||||||||||||||||||||||||||||||
croot |
*/ | 4:2 |
Root function z11/z2 |
croot(z1,z2) croot(a,b,c,d) z11/z2 = e1/z2•ln(z1)
|
||||||||||||||||||||||||||||||||||||
crootr |
~*/ | 4:2 |
Reverse root function z21/z1 |
crootr(z1,z2) crootr(a,b,c,d) z21/z1 = e1/z1•ln(z2)
|
||||||||||||||||||||||||||||||||||||
crootx |
3:2 |
Root function z1/x |
crootx(a,b,x) z1/x = e1/x•ln(z)
|
|||||||||||||||||||||||||||||||||||||
crootn |
3:2 |
Root function z1/n |
crootn(a,b,n) n - integer value
|
|||||||||||||||||||||||||||||||||||||
crootsn |
4:2 |
Root function z1/n |
crootsn(a,b,n,p) n - integer value p - integer value p = root number (0 ≤ p ≤ n-1)
|
|||||||||||||||||||||||||||||||||||||
croot2 csqrt |
2:2 |
Square root z1/2 |
croot2(a,b) csqrt(a,b) = (a',b') a' = ((r + a)/2)1/2 b' = ((r - a)/2)1/2 • sign(b) r = (a2 + b2)1/2
|
|||||||||||||||||||||||||||||||||||||
Complex number trigonometric functions | ||||||||||||||||||||||||||||||||||||||||
csin |
2:2 |
Sine |
csin(a,b) = (a',b') a' = sin(a)•cosh(b) b' = cos(a)•sinh(b)
|
|||||||||||||||||||||||||||||||||||||
ccos |
2:2 |
Cosine |
ccos(a,b) = (a',b') a' = cos(a)•cosh(b) b' = -sin(a)•sinh(b)
|
|||||||||||||||||||||||||||||||||||||
csec |
2:2 |
Secant |
csec(a,b) 1/ccos(a,b)
|
|||||||||||||||||||||||||||||||||||||
ccsc ccosec |
2:2 |
Cosecant |
ccsc(a,b) ccosec(a,b) 1/csin(a,b)
|
|||||||||||||||||||||||||||||||||||||
ctan |
2:2 |
Tangent |
ctan(a,b) csin(a,b)/ccos(a,b)
|
|||||||||||||||||||||||||||||||||||||
ccot ccotan |
2:2 |
Cotangent |
ccot(a,b) ccotan(a,b) ccos(a,b)/csin(a,b)
|
|||||||||||||||||||||||||||||||||||||
casin |
2:2 |
Inverse sine |
casin(a,b) -i•ln(i•z+(1-z2)1/2) -i•ln(i•(z+(z2-1)1/2))
|
|||||||||||||||||||||||||||||||||||||
cacos |
2:2 |
Inverse cosine |
cacos(a,b) -i•ln(z+(z2-1)1/2)
|
|||||||||||||||||||||||||||||||||||||
casec |
2:2 |
Inverse secant |
casec(a,b) casec(z) = cacos(1/z)
|
|||||||||||||||||||||||||||||||||||||
cacsc cacosec |
2:2 |
Inverse cosecant |
cacsc(a,b) cacosec(a,b) cacosec(z) = casin(1/z)
|
|||||||||||||||||||||||||||||||||||||
catan |
2:2 |
Inverse tangent |
catan(a,b) (1/2)•(-i)•ln((1+i•z)/(1-i•z))
|
|||||||||||||||||||||||||||||||||||||
cacot cacotan |
2:2 |
Inverse cotangent |
cacot(a,b) cacotan(a,b) (1/2)•i•ln((i•z+1)/(i•z-1))
|
|||||||||||||||||||||||||||||||||||||
Complex number hyperbolic functions | ||||||||||||||||||||||||||||||||||||||||
csinh |
2:2 |
Hyperbolic sine |
csinh(a,b) = (a',b') a' = sinh(a)•cos(b) b' = cosh(a)•sin(b)
|
|||||||||||||||||||||||||||||||||||||
ccosh |
2:2 |
Hyperbolic cosine |
ccosh(a,b) = (a',b') a' = cosh(a)•cos(b) b' = sinh(a)•sin(b)
|
|||||||||||||||||||||||||||||||||||||
csech |
2:2 |
Hyperbolic secant |
csech(a,b) 1/ccosh(a,b)
|
|||||||||||||||||||||||||||||||||||||
ccsch ccosech |
2:2 |
Hyperbolic cosecant |
ccsch(a,b) ccosech(a,b) 1/csinh(a,b)
|
|||||||||||||||||||||||||||||||||||||
ctanh |
2:2 |
Hyperbolic tangent |
ctanh(a,b) csinh(a,b)/ccosh(a,b)
|
|||||||||||||||||||||||||||||||||||||
ccoth ccotanh |
2:2 |
Hyperbolic cotangent |
ccoth(a,b) ccotanh(a,b) ccosh(a,b)/csinh(a,b)
|
|||||||||||||||||||||||||||||||||||||
casinh |
2:2 |
Inverse hyperbolic sine |
casinh(a,b) ln(z+(z2+1)1/2)
|
|||||||||||||||||||||||||||||||||||||
cacosh |
2:2 |
Inverse hyperbolic cosine |
cacosh(a,b) ln(z+(z2-1)1/2)
|
|||||||||||||||||||||||||||||||||||||
casech |
2:2 |
Inverse hyperbolic secant |
casech(a,b) casech(z) = cacosh(1/z)
|
|||||||||||||||||||||||||||||||||||||
cacsch cacosech |
2:2 |
Inverse hyperbolic cosecant |
cacsch(a,b) cacosech(a,b) cacosech(z) = casinh(1/z)
|
|||||||||||||||||||||||||||||||||||||
catanh |
2:2 |
Inverse hyperbolic tangent |
catanh(a,b) (1/2)*ln((1+z)/(1-z))
|
|||||||||||||||||||||||||||||||||||||
cacoth cacotanh |
2:2 |
Inverse hyperbolic cotangent |
cacoth(a,b) cacotanh(a,b) (1/2)*ln((z+1)/(z-1))
|
|||||||||||||||||||||||||||||||||||||
Special functions | ||||||||||||||||||||||||||||||||||||||||
factln | 1 |
Natural logarithm of factorial |
factln(x) = lgamma(x+1) |
|||||||||||||||||||||||||||||||||||||
fact | x! | 1 |
Factorial |
fact(x) = tgamma(x+1) |
||||||||||||||||||||||||||||||||||||
fact2 | x!! | 1 |
Double factorial No implementation |
x!! ≡ x |
||||||||||||||||||||||||||||||||||||
erf |
1 |
Error function |
||||||||||||||||||||||||||||||||||||||
erfc |
1 |
Complementary error function |
||||||||||||||||||||||||||||||||||||||
cdfnorm |
1 |
Cumulative normal distribution function |
||||||||||||||||||||||||||||||||||||||
erfinv |
1 |
Inverse error function |
||||||||||||||||||||||||||||||||||||||
erfcinv |
1 |
Inverse complementary error function |
||||||||||||||||||||||||||||||||||||||
cdfnorminv |
1 |
Inverse of normal distribution function |
||||||||||||||||||||||||||||||||||||||
lgamma | 1 |
Natural logarithm of the absolute value of gamma function |x| < 2.556348E+305 |
||||||||||||||||||||||||||||||||||||||
tgamma | 1 |
Gamma function |x| < 171.6 |
||||||||||||||||||||||||||||||||||||||
rgamma | 1 |
Reciprocal gamma function |x| < 171.6 |
||||||||||||||||||||||||||||||||||||||
rtgamma | 1 |
Reciprocal gamma function |x| < 171.6 |
rtgamma(x) = 1/tgamma(x) |
|||||||||||||||||||||||||||||||||||||
beta | 2 |
Beta function |
beta(x,y) = tgamma(x)*tgamma(y)/tgamma(x+y) |
|||||||||||||||||||||||||||||||||||||
Statistical functions | ||||||||||||||||||||||||||||||||||||||||
vvart |
-1 |
Total variance |
vvart(x1,x2,…,xn) = ∑i(xi - mean)2 ◊ vvart(x1) ≡ 0 |
|||||||||||||||||||||||||||||||||||||
vvars |
-2 |
Variance (sample variance) |
vvars(x1,x2,…,xn) = vvart(…)/(n-1) |
|||||||||||||||||||||||||||||||||||||
vvarp |
-1 |
Population variance |
vvarp(x1,x2,…,xn) = vvart(…)/(n) ◊ vvarp(x1) ≡ 0 |
|||||||||||||||||||||||||||||||||||||
vstd |
-2 |
Standard deviation (sample standard deviation) |
vstd(x1,x2,…,xn) = (vvars(…))1/2 |
|||||||||||||||||||||||||||||||||||||
vstdp |
-1 |
Population standard deviation |
vstdp(x1,x2,…,xn) = (vvarp(…))1/2 ◊ vstdp(x1) ≡ 0 |
|||||||||||||||||||||||||||||||||||||
Variable number of arguments | ||||||||||||||||||||||||||||||||||||||||
vncycle meander |
-6 |
n-th cycle function
Argument filters varg(…) not allowed. |
vncycle(x,a,P1,P2,…,Pn,V1,V2,…,Vn) period = P = P1+P2+…+Pn (Pi > 0)
returns: |
|||||||||||||||||||||||||||||||||||||
vnstep | -4 |
n-th step function
Argument filters varg(…) not allowed. |
vnstep(x,P1,P2,…,Pn,V0,V1,V2,…,Vn)
returns: |
|||||||||||||||||||||||||||||||||||||
vadd vsum |
-1 |
Sum of values |
vadd(x1,x2) ≡ add(x1,x2) ◊ vadd(x1) ≡ x1 |
|||||||||||||||||||||||||||||||||||||
vmul | -1 |
Product of values |
vmul(x1,x2) ≡ mul(x1,x2) ◊ vmul(x1) ≡ x1 |
|||||||||||||||||||||||||||||||||||||
vmin | -1 |
The smaller of values |
vmin(x1,x2) ≡ min(x1,x2) ◊ vmin(x1) ≡ x1 |
|||||||||||||||||||||||||||||||||||||
vmax | -1 |
The larger of values |
vmax(x1,x2) ≡ max(x1,x2) ◊ vmax(x1) ≡ x1 |
|||||||||||||||||||||||||||||||||||||
vminmax | -1:2 |
The smaller and the larger of values |
vminmax(x1,x2,…,xn) = (min,max)
|
|||||||||||||||||||||||||||||||||||||
co.vminmax | -3 |
The smaller and the larger of values Returns result in double variables xmin and xmax
Argument filters varg(…) not allowed. |
co.vminmax(*xmin,*xmax, x1,x2,…,xn)
|
|||||||||||||||||||||||||||||||||||||
vmaxmin | -1:2 |
The larger and the smaller of values |
vmaxmin(x1,x2,…,xn) = (max,min)
|
|||||||||||||||||||||||||||||||||||||
co.vmaxmin | -3 |
The larger and the smaller of values Returns result in double variables xmax and xmin
Argument filters varg(…) not allowed. |
co.vmaxmin(*xmax,*xmin, x1,x2,…,xn)
|
|||||||||||||||||||||||||||||||||||||
vmin.adev |
-2 |
The smaller absolute deviation. |
vmin.adev(x1,x2,…,xn, a)
returns:
|
|||||||||||||||||||||||||||||||||||||
vminl.adev |
-2 |
The value of the argument with the smaller absolute deviation. Prefer argument with a lower index |
vminl.adev(x1,x2,…,xn, a) deviationi = abs(a-xi)
|
|||||||||||||||||||||||||||||||||||||
vminh.adev |
-2 |
The value of the argument with the smaller absolute deviation. Prefer argument with a higher index |
vminh.adev(x1,x2,…,xn, a) deviationi = abs(a-xi)
|
|||||||||||||||||||||||||||||||||||||
vmax.adev |
-2 |
The larger absolute deviation. |
vmax.adev(x1,x2,…,xn, a)
returns:
|
|||||||||||||||||||||||||||||||||||||
vmaxl.adev |
-2 |
The value of the argument with the larger absolute deviation. Prefer argument with a lower index |
vmaxl.adev(x1,x2,…,xn, a) deviationi = abs(a-xi)
|
|||||||||||||||||||||||||||||||||||||
vmaxh.adev |
-2 |
The value of the argument with the larger absolute deviation. Prefer argument with a higher index |
vmaxh.adev(x1,x2,…,xn, a) deviationi = abs(a-xi)
|
|||||||||||||||||||||||||||||||||||||
vavg vmean |
-1 |
Arithmetic average of values |
vavg(x1,x2) ≡ avg(x1,x2) ◊ vavg(x1) ≡ x1 |
|||||||||||||||||||||||||||||||||||||
vsumsqr sumsqr |
-1 |
Sum of squares of values |
vsumsqr(x1,x2,…,xn) = x12 + x22 + ... + xn2 ◊ vsumsqr(x1) ≡ x12 |
|||||||||||||||||||||||||||||||||||||
vpoly poly |
-2 |
Uniform polynomial
Argument filters varg(…) not allowed. |
vpoly(x,c0,c1,…,cn) = c0 + c1*x + c2*x2 + … + cn*xn ◊ vpoly(x,c0) ≡ c0 |
|||||||||||||||||||||||||||||||||||||
vnorm norm |
-1 |
Euclidean L2-norm |
vnorm(x1,x2,…,xn) = (x12 + x22 + ... + xn2)1/2 ◊ vnorm(x1) ≡ abs(x1) |
|||||||||||||||||||||||||||||||||||||
Percent functions | ||||||||||||||||||||||||||||||||||||||||
percent.mul |
*% |
2 | What is x percent of y |
x *% y (x*y)/100 |
||||||||||||||||||||||||||||||||||||
percent.div |
/% |
2 | x is what percent of y |
x /% y (x/y)*100 |
||||||||||||||||||||||||||||||||||||
percent.divr |
~/% |
2 | y is what percent of x |
x ~/% y (y/x)*100 |
||||||||||||||||||||||||||||||||||||
percent.inc |
+% |
2 | What is the percentage increase from x to y |
x +% y ((y-x)/x)*100 |
||||||||||||||||||||||||||||||||||||
percent.incr |
~+% |
2 | What is the percentage increase from y to x |
x ~+% y ((x-y)/y)*100 |
||||||||||||||||||||||||||||||||||||
percent.dec |
-% |
2 | What is the percentage decrease from x to y |
x -% y ((x-y)/x)*100 |
||||||||||||||||||||||||||||||||||||
percent.decr |
~-% |
2 | What is the percentage decrease from y to x |
x ~-% y ((y-x)/y)*100 |
||||||||||||||||||||||||||||||||||||
Angle conversion functions | ||||||||||||||||||||||||||||||||||||||||
a2d | 3 | Arc d:m:s to degrees |
degrees = d + m/60 + s/3600 |
|||||||||||||||||||||||||||||||||||||
a2r | 3 | Arc d:m:s to radians | ||||||||||||||||||||||||||||||||||||||
a2g | 3 | Arc d:m:s to grads | ||||||||||||||||||||||||||||||||||||||
a2c | 3 | Arc d:m:s to cycles | ||||||||||||||||||||||||||||||||||||||
d2a | 1:3 |
Degrees to arc d:m:s |
d2a(x) = (d,m,s)
|
|||||||||||||||||||||||||||||||||||||
co.d2a | 4 |
Degrees to arc d:m:s |
co.d2a(*d,*m,*s, x)
|
|||||||||||||||||||||||||||||||||||||
d2r radians |
x° | 1 | Degrees to radians |
360 degrees = 2π radians |
||||||||||||||||||||||||||||||||||||
d2g | 1 | Degrees to grads |
360 degrees = 400 grads |
|||||||||||||||||||||||||||||||||||||
d2c | 1 | Degrees to cycles |
360 degrees = 1 cycle |
|||||||||||||||||||||||||||||||||||||
r2d degrees |
°x | 1 | Radians to degrees |
2π radians = 360 degrees |
||||||||||||||||||||||||||||||||||||
r2a | 1:3 |
Radians to arc d:m:s |
r2a(x) = (d,m,s)
|
|||||||||||||||||||||||||||||||||||||
co.r2a | 4 |
Radians to arc d:m:s |
co.r2a(*d,*m,*s, x)
|
|||||||||||||||||||||||||||||||||||||
r2g | °°x | 1 | Radians to grads |
2π radians = 400 grads |
||||||||||||||||||||||||||||||||||||
r2c | 1 | Radians to cycles |
2π radians = 1 cycle |
|||||||||||||||||||||||||||||||||||||
g2r | x°° | 1 | Grads to radians |
400 grads = 2π radians |
||||||||||||||||||||||||||||||||||||
g2d | 1 | Grads to degrees |
400 grads = 360 degrees |
|||||||||||||||||||||||||||||||||||||
g2a | 1:3 |
Grads to arc d:m:s |
g2a(x) = (d,m,s)
|
|||||||||||||||||||||||||||||||||||||
co.g2a | 4 |
Grads to arc d:m:s |
co.g2a(*d,*m,*s, x)
|
|||||||||||||||||||||||||||||||||||||
g2c | 1 | Grads to cycles |
400 grads = 1 cycle |
|||||||||||||||||||||||||||||||||||||
c2r | 1 | Cycles to radians |
1 cycle = 2π radians |
|||||||||||||||||||||||||||||||||||||
c2d | 1 | Cycles to degrees |
1 cycle = 360 degrees |
|||||||||||||||||||||||||||||||||||||
c2a | 1:3 |
Cycles to arc d:m:s |
c2a(x) = (d,m,s)
|
|||||||||||||||||||||||||||||||||||||
co.c2a | 4 |
Cycles to arc d:m:s |
co.c2a(*d,*m,*s, x)
|
|||||||||||||||||||||||||||||||||||||
c2g | 1 | Cycles to grads |
1 cycle = 400 grads |
|||||||||||||||||||||||||||||||||||||
Temperature conversion functions | ||||||||||||||||||||||||||||||||||||||||
ce2ke | 1 | Celsius to kelvin | K = °C + 273.15 | |||||||||||||||||||||||||||||||||||||
ce2fa | 1 | Celsius to fahrenheit | °F = °C×1.8 + 32 | |||||||||||||||||||||||||||||||||||||
ce2ra | 1 | Celsius to rankine | °Ra = °C×1.8 + 491.67 | |||||||||||||||||||||||||||||||||||||
ce2re | 1 | Celsius to reaumur | °R = °C×0.8 | |||||||||||||||||||||||||||||||||||||
ke2ce | 1 | Kelvin to celsius | °C = K - 273.15 | |||||||||||||||||||||||||||||||||||||
ke2fa | 1 | Kelvin to fahrenheit | °F = K×1.8 - 459.67 | |||||||||||||||||||||||||||||||||||||
ke2ra | 1 | Kelvin to rankine | °Ra = K×1.8 | |||||||||||||||||||||||||||||||||||||
ke2re | 1 | Kelvin to reaumur | °R = (K - 273.15)×0.8 | |||||||||||||||||||||||||||||||||||||
fa2ce | 1 | Fahrenheit to celsius | °C = (°F - 32)/1.8 | |||||||||||||||||||||||||||||||||||||
fa2ke | 1 | Fahrenheit to kelvin | K = (°F + 459.67)/1.8 | |||||||||||||||||||||||||||||||||||||
fa2ra | 1 | Fahrenheit to rankine | °Ra = °F + 459.67 | |||||||||||||||||||||||||||||||||||||
fa2re | 1 | Fahrenheit to reaumur | °R = (°F - 32)/2.25 | |||||||||||||||||||||||||||||||||||||
ra2ce | 1 | Rankine to celsius | °C = (°Ra - 491.67)/1.8 | |||||||||||||||||||||||||||||||||||||
ra2ke | 1 | Rankine to kelvin | K = °Ra/1.8 | |||||||||||||||||||||||||||||||||||||
ra2fa | 1 | Rankine to fahrenheit | °F = °Ra - 459.67 | |||||||||||||||||||||||||||||||||||||
ra2re | 1 | Rankine to reaumur | °R = (°Ra - 491.67)/2.25 | |||||||||||||||||||||||||||||||||||||
re2ce | 1 | Reaumur to celsius | °C = °R×1.25 | |||||||||||||||||||||||||||||||||||||
re2ke | 1 | Reaumur to kelvin | K = °R×1.25 + 273.15 | |||||||||||||||||||||||||||||||||||||
re2fa | 1 | Reaumur to fahrenheit | °F = °R×2.25 + 32 | |||||||||||||||||||||||||||||||||||||
re2ra | 1 | Reaumur to rankine | °Ra = °R×2.25 + 491.67 | |||||||||||||||||||||||||||||||||||||
Units functions | ||||||||||||||||||||||||||||||||||||||||
bit | 1 |
bit(a) = a÷8 = a×(1/8) |
||||||||||||||||||||||||||||||||||||||
nibble | 1 |
nibble(a) = a÷2 = a×(1/2) |
||||||||||||||||||||||||||||||||||||||
byte | 1 |
byte(a) = a×1 |
||||||||||||||||||||||||||||||||||||||
word | 1 |
word(a) = a×2 |
||||||||||||||||||||||||||||||||||||||
dword | 1 |
dword(a) = a×4 |
||||||||||||||||||||||||||||||||||||||
qword | 1 |
qword(a) = a×8 |
||||||||||||||||||||||||||||||||||||||
nword | 1 | Native integer word |
nword(a) = a×8 (x64) | a×4 (x32) |
|||||||||||||||||||||||||||||||||||||
tword | 1 |
tword(a) = a×10 |
||||||||||||||||||||||||||||||||||||||
xword | 1 |
xword(a) = a×16 |
||||||||||||||||||||||||||||||||||||||
oword | 1 |
oword(a) = a×16 |
||||||||||||||||||||||||||||||||||||||
yword | 1 |
yword(a) = a×32 |
||||||||||||||||||||||||||||||||||||||
zword | 1 |
zword(a) = a×64 |
||||||||||||||||||||||||||||||||||||||
kibi | 1 |
kibi (Ki) |
kibi(a) = a×210 | |||||||||||||||||||||||||||||||||||||
mebi | 1 |
mebi (Mi) |
mebi(a) = a×220 | |||||||||||||||||||||||||||||||||||||
gibi | 1 |
gibi (Gi) |
gibi(a) = a×230 | |||||||||||||||||||||||||||||||||||||
tebi | 1 |
tebi (Ti) |
tebi(a) = a×240 | |||||||||||||||||||||||||||||||||||||
pebi | 1 |
pebi (Pi) |
pebi(a) = a×250 | |||||||||||||||||||||||||||||||||||||
exbi | 1 |
exbi (Ei) |
exbi(a) = a×260 | |||||||||||||||||||||||||||||||||||||
zebi | 1 |
zebi (Zi) |
zebi(a) = a×270 | |||||||||||||||||||||||||||||||||||||
yobi | 1 |
yobi (Yi) |
yobi(a) = a×280 | |||||||||||||||||||||||||||||||||||||
robi | 1 |
robi (Ri) |
robi(a) = a×290 | |||||||||||||||||||||||||||||||||||||
quebi | 1 |
quebi (Qi) |
quebi(a) = a×2100 | |||||||||||||||||||||||||||||||||||||
kibo | 1 | kibo(a) = a×2-10 | ||||||||||||||||||||||||||||||||||||||
mebo | 1 | mebo(a) = a×2-20 | ||||||||||||||||||||||||||||||||||||||
gibo | 1 | gibo(a) = a×2-30 | ||||||||||||||||||||||||||||||||||||||
tebo | 1 | tebo(a) = a×2-40 | ||||||||||||||||||||||||||||||||||||||
pebo | 1 | pebo(a) = a×2-50 | ||||||||||||||||||||||||||||||||||||||
exbo | 1 | exbo(a) = a×2-60 | ||||||||||||||||||||||||||||||||||||||
zebo | 1 | zebo(a) = a×2-70 | ||||||||||||||||||||||||||||||||||||||
yobo | 1 | yobo(a) = a×2-80 | ||||||||||||||||||||||||||||||||||||||
robo | 1 | robo(a) = a×2-90 | ||||||||||||||||||||||||||||||||||||||
quebo | 1 | quebo(a) = a×2-100 | ||||||||||||||||||||||||||||||||||||||
deca | 1 |
deca (da) |
deca(a) = a×101 | |||||||||||||||||||||||||||||||||||||
hecto | 1 |
hecto (h) |
hecto(a) = a×102 | |||||||||||||||||||||||||||||||||||||
kilo | 1 |
kilo (k) |
kilo(a) = a×103 | |||||||||||||||||||||||||||||||||||||
mega | 1 |
mega (M) |
mega(a) = a×106 | |||||||||||||||||||||||||||||||||||||
giga | 1 |
giga (G) |
giga(a) = a×109 | |||||||||||||||||||||||||||||||||||||
tera | 1 |
tera (T) |
tera(a) = a×1012 | |||||||||||||||||||||||||||||||||||||
peta | 1 |
peta (P) |
peta(a) = a×1015 | |||||||||||||||||||||||||||||||||||||
exa | 1 |
exa (E) |
exa(a) = a×1018 | |||||||||||||||||||||||||||||||||||||
zetta | 1 |
zetta (Z) |
zetta(a) = a×1021 | |||||||||||||||||||||||||||||||||||||
yotta | 1 |
yotta (Y) |
yotta(a) = a×1024 | |||||||||||||||||||||||||||||||||||||
ronna | 1 |
ronna (R) |
ronna(a) = a×1027 | |||||||||||||||||||||||||||||||||||||
quetta | 1 |
quetta (Q) |
quetta(a) = a×1030 | |||||||||||||||||||||||||||||||||||||
deci | 1 |
deci (d) |
deci(a) = a×10-1 | |||||||||||||||||||||||||||||||||||||
centi | 1 |
centi (c) |
centi(a) = a×10-2 | |||||||||||||||||||||||||||||||||||||
milli | 1 |
milli (m) |
milli(a) = a×10-3 | |||||||||||||||||||||||||||||||||||||
micro | 1 |
micro (μ) |
micro(a) = a×10-6 | |||||||||||||||||||||||||||||||||||||
nano | 1 |
nano (n) |
nano(a) = a×10-9 | |||||||||||||||||||||||||||||||||||||
pico | 1 |
pico (p) |
pico(a) = a×10-12 | |||||||||||||||||||||||||||||||||||||
femto | 1 |
femto (f) |
femto(a) = a×10-15 | |||||||||||||||||||||||||||||||||||||
atto | 1 |
atto (a) |
atto(a) = a×10-18 | |||||||||||||||||||||||||||||||||||||
zepto | 1 |
zepto (z) |
zepto(a) = a×10-21 | |||||||||||||||||||||||||||||||||||||
yocto | 1 |
yocto (y) |
yocto(a) = a×10-24 | |||||||||||||||||||||||||||||||||||||
ronto | 1 |
ronto (r) |
ronto(a) = a×10-27 | |||||||||||||||||||||||||||||||||||||
quecto | 1 |
quecto (q) |
quecto(a) = a×10-30 | |||||||||||||||||||||||||||||||||||||
Data modifier functions | ||||||||||||||||||||||||||||||||||||||||
:+ | 1 | Positive value or zero |
a:+ = pos(a) |
|||||||||||||||||||||||||||||||||||||
:- | 1 | Negative value or zero |
a:- = neg(a) |
|||||||||||||||||||||||||||||||||||||
:++ | 1 | Increment by 1 |
a:++ = inc(a) |
|||||||||||||||||||||||||||||||||||||
:-- | 1 | Decrement by 1 |
a:-- = dec(a) |
|||||||||||||||||||||||||||||||||||||
:2pi | 1 |
a:2pi = a×(2π) |
||||||||||||||||||||||||||||||||||||||
:pi | 1 |
a:pi = a×(π) |
||||||||||||||||||||||||||||||||||||||
:pi2 | 1 |
a:pi2 = a×(π/2) |
||||||||||||||||||||||||||||||||||||||
:pi4 | 1 |
a:pi4 = a×(π/4) |
||||||||||||||||||||||||||||||||||||||
:/2pi | 1 |
a:/2pi = a÷(2π) = a×(1/2π) |
||||||||||||||||||||||||||||||||||||||
:/pi | 1 |
a:/pi = a÷(π) = a×(1/π) |
||||||||||||||||||||||||||||||||||||||
:/pi2 | 1 |
a:/pi2 = a÷(π/2) = a×(2/π) |
||||||||||||||||||||||||||||||||||||||
:/pi4 | 1 |
a:/pi4 = a÷(π/4) = a×(4/π) |
||||||||||||||||||||||||||||||||||||||
:\2pi | 1 |
a:\2pi = a quo (2π) |
||||||||||||||||||||||||||||||||||||||
:\pi | 1 |
a:\pi = a quo (π) |
||||||||||||||||||||||||||||||||||||||
:\pi2 | 1 |
a:\pi2 = a quo (π/2) |
||||||||||||||||||||||||||||||||||||||
:\pi4 | 1 |
a:\pi4 = a quo (π/4) |
||||||||||||||||||||||||||||||||||||||
:%2pi | 1 |
a:%2pi = a mod (2π) |
||||||||||||||||||||||||||||||||||||||
:%pi | 1 |
a:%pi = a mod (π) |
||||||||||||||||||||||||||||||||||||||
:%pi2 | 1 |
a:%pi2 = a mod (π/2) |
||||||||||||||||||||||||||||||||||||||
:%pi4 | 1 |
a:%pi4 = a mod (π/4) |
||||||||||||||||||||||||||||||||||||||
Approximate exponential functions | ||||||||||||||||||||||||||||||||||||||||
fexp |
1 |
Exponential function x < 1024*loge(2) |
||||||||||||||||||||||||||||||||||||||
fexp2 fpow2x |
1 |
2 raised to a power of x x < 1024 |
||||||||||||||||||||||||||||||||||||||
fexp10 fpow10x |
1 |
10 raised to a power of x x < 1024*log10(2) |
||||||||||||||||||||||||||||||||||||||
fln floge |
1 |
Natural logarithm |
loge(x) =
loge(S*2E) = loge(S) + E*loge(2)
loge(x) = loge(x/√2) + loge(√2) |
|||||||||||||||||||||||||||||||||||||
flb flog2 |
1 |
Base-2 logarithm |
log2(x) =
log2(S*2E) = log2(S) + E = log2(e)*loge(S) + E
log2(x) = log2(x/√2) + 0.5 |
|||||||||||||||||||||||||||||||||||||
flg flog10 |
1 |
Base-10 logarithm |
log10(x) =
log10(S*2E) = log10(S) + E*log10(2) = log10(e)*loge(S) + E*log10(2)
log10(x) = log10(x/√2) + log10(√2) |
|||||||||||||||||||||||||||||||||||||
flogn |
1 |
Base-n logarithm |
logn(x) flogn(n,x) = floge(x)/floge(n) |
|||||||||||||||||||||||||||||||||||||
flognr |
1 |
Reverse base-n logarithm |
logn(x) flognr(x,n) = floge(x)/floge(n) |
|||||||||||||||||||||||||||||||||||||
Approximate power functions | ||||||||||||||||||||||||||||||||||||||||
fpow fpower |
2 |
Power function xy |
fpow(x,y) = fexp2(z) z = y*flog2(x) |
|||||||||||||||||||||||||||||||||||||
fapow fapower |
2 |
Power function |x|y |
fapow(x,y) fpow(abs(x),y) |
|||||||||||||||||||||||||||||||||||||
fpowr fpowerr |
2 |
Reverse power function yx |
fpowr(x,y) = fexp2(z) z = x*flog2(y) |
|||||||||||||||||||||||||||||||||||||
fapowr fapowerr |
2 |
Reverse power function |y|x |
fapowr(x,y) fpowr(x,abs(y)) |
|||||||||||||||||||||||||||||||||||||
Approximate trigonometric functions | ||||||||||||||||||||||||||||||||||||||||
fsin |
1 |
Sine |x| < 251 |
|
|||||||||||||||||||||||||||||||||||||
fcos |
1 |
Cosine |x| < 251 |
|
|||||||||||||||||||||||||||||||||||||
fsec |
1 |
Secant |x| < 251 |
fsec(x) = 1/fcos(x)
|
|||||||||||||||||||||||||||||||||||||
fcsc fcosec |
1 |
Cosecant |x| < 251 |
fcosec(x) = 1/fsin(x)
|
|||||||||||||||||||||||||||||||||||||
ftan |
1 |
Tangent |x| < 251 |
|
|||||||||||||||||||||||||||||||||||||
fcot fcotan |
1 |
Cotangent |x| < 251 |
fcotan(x) = 1/ftan(x)
|
|||||||||||||||||||||||||||||||||||||
fsinpi |
1 |
Sine |
fsinpi(x) = fsin(pi*x) |
|||||||||||||||||||||||||||||||||||||
fcospi |
1 |
Cosine |
fcospi(x) = fcos(pi*x) |
|||||||||||||||||||||||||||||||||||||
fsecpi |
1 |
Secant |
fsecpi(x) = fsec(pi*x) |
|||||||||||||||||||||||||||||||||||||
fcscpi fcosecpi |
1 |
Cosecant |
fcosecpi(x) = fcosec(pi*x) |
|||||||||||||||||||||||||||||||||||||
ftanpi |
1 |
Tangent |
ftanpi(x) = ftan(pi*x) |
|||||||||||||||||||||||||||||||||||||
fcotpi fcotanpi |
1 |
Cotangent |
fcotanpi(x) = fcotan(pi*x) |
|||||||||||||||||||||||||||||||||||||
fsincos |
1:2 |
Sine and cosine |x| < 251 |
fsincos(x) (fsin(x),fcos(x))
|
|||||||||||||||||||||||||||||||||||||
co.fsincos |
3 |
Sine and cosine |x| < 251 |
co.fsincos(sin*,cos*, x)
|
|||||||||||||||||||||||||||||||||||||
fcossin |
1:2 |
Cosine and sine |x| < 251 |
fcossin(x) (fcos(x),fsin(x))
|
|||||||||||||||||||||||||||||||||||||
co.fcossin |
3 |
Cosine and sine |x| < 251 |
co.fcossin(cos*,sin*, x)
|
|||||||||||||||||||||||||||||||||||||
fsincospi |
1:2 |
Sine and cosine |
fsincospi(x) (fsinpi(x),fcospi(x))
|
|||||||||||||||||||||||||||||||||||||
co.fsincospi |
3 |
Sine and cosine |
co.fsincospi(sin*,cos*, x)
|
|||||||||||||||||||||||||||||||||||||
fcossinpi |
1:2 |
Cosine and sine |
fcossinpi(x) (fcospi(x),fsinpi(x))
|
|||||||||||||||||||||||||||||||||||||
co.fcossinpi |
3 |
Cosine and sine |
co.fcossinpi(cos*,sin*, x)
|
|||||||||||||||||||||||||||||||||||||
fasin |
1 |
Inverse sine |
||||||||||||||||||||||||||||||||||||||
facos |
1 |
Inverse cosine |
||||||||||||||||||||||||||||||||||||||
fasec |
1 | Inverse secant | fasec(x) = facos(1/x) | |||||||||||||||||||||||||||||||||||||
facsc facosec |
1 | Inverse cosecant | facosec(x) = fasin(1/x) | |||||||||||||||||||||||||||||||||||||
fatan |
1 |
Inverse tangent |
||||||||||||||||||||||||||||||||||||||
fatan2 |
2 |
Inverse tangent of y/x |
fatan2(y,x) |
|||||||||||||||||||||||||||||||||||||
fatan2r |
2 |
Inverse tangent of y/x |
fatan2r(x,y) |
|||||||||||||||||||||||||||||||||||||
facot facotan |
1 |
Inverse cotangent |
facotan(x) = pi/2 - fatan(x) |
|||||||||||||||||||||||||||||||||||||
Approximate hyperbolic functions | ||||||||||||||||||||||||||||||||||||||||
fsh fsinh |
1 |
Hyperbolic sine |
||||||||||||||||||||||||||||||||||||||
fch fcosh |
1 |
Hyperbolic cosine |
||||||||||||||||||||||||||||||||||||||
fsech |
1 | Hyperbolic secant |
fsech(x) = 1/fcosh(x) |
|||||||||||||||||||||||||||||||||||||
fcsch fcosech |
1 | Hyperbolic cosecant |
fcosech(x) = 1/fsinh(x) |
|||||||||||||||||||||||||||||||||||||
ftanh |
1 |
Hyperbolic tangent |
||||||||||||||||||||||||||||||||||||||
fcoth fcotanh |
1 |
Hyperbolic cotangent |
||||||||||||||||||||||||||||||||||||||
fshch |
1:2 | Hyperbolic sine and cosine |
fshch(x) (fsh(x),fch(x))
|
|||||||||||||||||||||||||||||||||||||
co.fshch |
3 | Hyperbolic sine and cosine |
co.fshch(*sh,*ch, x)
|
|||||||||||||||||||||||||||||||||||||
fchsh |
1:2 | Hyperbolic cosine and sine |
fchsh(x) (fch(x),fsh(x))
|
|||||||||||||||||||||||||||||||||||||
co.fchsh |
3 | Hyperbolic cosine and sine |
co.fchsh(*ch,*sh, x)
|
|||||||||||||||||||||||||||||||||||||
fasinh |
1 |
Inverse hyperbolic sine |
||||||||||||||||||||||||||||||||||||||
facosh |
1 |
Inverse hyperbolic cosine |
||||||||||||||||||||||||||||||||||||||
fasech |
1 | Inverse hyperbolic secant | fasech(x) = facosh(1/x) | |||||||||||||||||||||||||||||||||||||
facsch facosech |
1 | Inverse hyperbolic cosecant | facosech(x) = fasinh(1/x) | |||||||||||||||||||||||||||||||||||||
fatanh |
1 |
Inverse hyperbolic tangent |
||||||||||||||||||||||||||||||||||||||
facoth facotanh |
1 |
Inverse hyperbolic cotangent |
Fuchsia-colored functions have an implementation with integer parameters.
For such functions, there are both
double func (double x1, double x2, …, double xn) and
double func (integer x1, integer x2, …, integer xn)
Green-colored functions accept only integer parameters.
Description of the functions that have only the FPU implementation contains the #FPU tag.
Third column = argument count [:result count]
Functions with integer result : ‹result count› = i
Functions with pointer result : ‹result count› = p
Default value of ‹result count› is 1
Functions with a variable number of arguments:
• argument count < 0
• ABS (argument count) = minimum argument count
SIC_CFG_FLAG_CASE_SENSITIVE
SIC_CFG_FLAG_NO_UDF – bypass user-defined functions in SICx*.UDF file
SIC_CFG_FLAG_NO_UDC – bypass user-defined constants in SICx*.UDC file
SIC_CFG_FLAG_NO_UDV – bypass user-defined variables in SICx*.UDV file
SIC_OPT_FLAG_OPTIMIZATION
SIC_OPT_FLAG_STACK_FRAME
SIC_OPT_FLAG_LOCALS
SIC_OPT_FLAG_FP_FRAME
SIC_OPT_FLAG_DEBUG
SIC_OPT_FLAG_CPUX64
SIC_OPT_FLAG_CPUX32
SIC_OPT_FLAG_CPUX
SIC_OPT_FLAG_DALIGN
SIC_OPT_FLAG_NO_CALIGN
SIC_OPT_FLAG_NO_ECALC
SIC_OPT_FLAG_COMPLEX
SIC_OPT_FLAG_COMPACT
You can change compiler option inside the multi-line expressions
using $... and #... directives.
$+ #+ enable option
$- #- disable option
$> #> execute option
$= #= set default options
${ #{ save options
$} #} restore options
For example:
use $+OPTIMIZATION statement to enable SIC_OPT_FLAG_OPTIMIZATION
use $-OPTIMIZATION statement to disable SIC_OPT_FLAG_OPTIMIZATION
and so on.
The compiler option name in $# statements is case insensitive.
You can use both _ or . symbol in option name.
$+stack_frame is identical to $+stack.frame
The depth of the ${ … $} #{ … #} directives is 256.
Enable/disable the code optimization.
This option is enabled by default.
$+ optimization
$- optimization
Enable/disable the generation of stack frames.
This option is enabled by default.
$+ stack.frame
$+ stack_frame
$- stack.frame
$- stack_frame
Enable/disable the allocation of local variables.
This option is enabled by default.
Enable/disable the generation of FPU/SSE frames.
This option is disabled by default.
$+ fp.frame
$+ fp_frame
$- fp.frame
$- fp_frame
Enable/disable debug mode.
This option is disabled by default.
SIC_OPT_FLAG_CPUX64
SIC_OPT_FLAG_CPUX32
SIC_OPT_FLAG_CPUX
$+ CPUX64
$+ CPUX32
$+ CPUX
$- CPUX64
$- CPUX32
$- CPUX
Examples:
$+ CPUX64 // the following code is accepted only on a 64-bit CPU
x = 640;
a = x + 2;
$+ CPUX32 // the following code is accepted only on a 32-bit CPU
y = 320;
b = y + 2;
$+ CPUX // the following code is accepted on any CPU
z = 888;
c = z + 2;
$- CPUX64 // the following code is rejected only on a 64-bit CPU
x = 640;
a = x + 2;
$- CPUX32 // the following code is rejected only on a 32-bit CPU
y = 320;
b = y + 2;
$- CPUX // the following code is rejected on any CPU
t = 555;
d = t + 2;
$+ CPUX // the following code is accepted on any CPU
z = 888;
c = z + 2;
Enable/disable data alignment.
This option is disabled by default.
$+ dalign N // enable N-byte data alignment (0 < N ≤ 64)
$+ dalign // enable default data alignment
$- dalign // disable data alignment
$> dalign N // perform N-byte data alignment (0 < N ≤ 64)
$> dalign // perform default data alignment
Default alignment:
x32-FPU: 8-byte
x32-SSE: 16-byte
x64-FPU: 16-byte
x64-SSE: 16-byte
Examples:
$+ dalign 16 // enable 16-byte data alignment
var z0.re=3;
$- dalign // disable data alignment
var z0.im=4;
complex z0 absolute z0.re;
// z0.re - aligned
// z0.im - not aligned
// Re(z0) = z0.re
// Im(z0) = z0.im
$+ dalign 16 // enable 16-byte data alignment
var z0.re=3;
var z0.im=4;
complex z0 absolute z0.re;
// z0.re - aligned
// z0.im - aligned
// Re(z0) = z0.re
// Im(z0) = undefined
$> dalign 16 // perform 16-byte data alignment
var z0.re=3;
var z0.im=4;
complex z0 absolute z0.re;
// z0.re - aligned
// z0.im - not aligned
// Re(z0) = z0.re
// Im(z0) = z0.im
$> dalign 16 // perform 16-byte data alignment
var z0.re=3;
$> dalign 16 // perform 16-byte data alignment
var z0.im=4;
complex z0 absolute z0.re;
// z0.re - aligned
// z0.im - aligned
// Re(z0) = z0.re
// Im(z0) = undefined
Disable/enable the code alignment.
This option is disabled by default.
$+ no.calign
$+ no_calign
$- no.calign
$- no_calign
Disable/enable the compile-time calculations of external functions with constant arguments.
This option is disabled by default.
$+ no.ecalc
$+ no_ecalc
$- no.ecalc
$- no_ecalc
Enable/disable the symbols
+ - ~-
* / ~/
^ ~^
** ~**
*/ ~*/
in expressions with complex numbers.
This option is disabled by default.
Example:
complex z0, z1=1.2,3.4, z2=5.6,7.8;
$+ complex // enable SIC_OPT_FLAG_COMPLEX
z0 = z1 + z2 * z1; // SUCCESS
$- complex // disable SIC_OPT_FLAG_COMPLEX
z0 = z1 + z2 * z1; // ERROR
Enable/disable the compact mode.
If compact mode is enabled, you can use a line break as an expression separator.
This option is disabled by default.
Example:
$+ compact // enable SIC_OPT_FLAG_COMPACT
a = sin(x)
b = cos(x)
c = a^2 + b^2
$- compact // disable SIC_OPT_FLAG_COMPACT
a = sin(x);
b = cos(x);
c = a^2 + b^2;
SIC_ERROR_SUCCESS = 0
SIC_ERROR_GENERAL = 1
SIC_ERROR_CPU = 2
SIC_ERROR_STRING = 3
SIC_ERROR_MEMORY = 4
SIC_ERROR_BRACKET = 5
SIC_ERROR_TOKEN = 6
SIC_ERROR_RT_TOKEN = 7
SIC_ERROR_STACK = 8
SIC_ERROR_RPN_BUILD = 9
SIC_ERROR_CODE_BUILD = 10
SIC_ERROR_ARGUMENT = 11
SIC_ERROR_EVALUATE = 12
SIC_ERROR_EXECUTE = 13
SIC_ERROR_RANGE = 14
SIC_ERROR_NO_IMPL = 15
SIC_ERROR_POINTER = 16
Double constants
1
1.1
1E+1
1D+1
Double base-16 constants
$: 400921FB54442D18 = 3.141592653589793
0h 40934A456D5CFAAD = 1234.5678
0H 3FF0000000000000 = 1.0
Integer base-10 constants
# 111 = 11110
0i 111 = 11110
0I 111 = 11110
0n 111 = 11110
0N 111 = 11110
0t 111 = 11110
0T 111 = 11110
Integer base-16 constants
$ 111 = 11116 = 27310
0x 111 = 11116 = 27310
0X 111 = 11116 = 27310
Integer base-2 constants
## 111 = 1112 = 710
0b 111 = 1112 = 710
0B 111 = 1112 = 710
Integer base-8 constants
$$ 111 = 1118 = 7310
0o 111 = 1118 = 7310
0O 111 = 1118 = 7310
Passing constant as double parameter
x = sin(100)
x = sin(#100:double)
x = sin(0i100:double)
x = sin($64:double)
x = sin(0x64:double)
x = sin(##01100100:double)
x = sin(0b01100100:double)
x = sin($$144:double)
x = sin(0o144:double)
x = y*100
x = y*0i100:double
Passing constant as integer parameter
x = func(100:int)
x = func(#100)
x = func(0i100)
x = func($64)
x = func(0x64)
x = func(##01100100)
x = func(0b01100100)
x = func($$144)
x = func(0o144)
Named labels | |
proc: |
no align |
proc:0 |
no align |
proc:N |
align N (0 < N ≤ 64) |
proc:16 |
align 16 |
proc:: |
default align |
Anonymous labels (for code alignment only) | |
@@: |
no align |
@@:0 |
no align |
@@:N |
align N (0 < N ≤ 64) |
@@:16 |
align 16 |
@@:: |
default align |
Default alignment:
x32-FPU: 8-byte
x32-SSE: 16-byte
x64-FPU: 16-byte
x64-SSE: 16-byte
To disable code align at labels, enable SIC_OPT_FLAG_NO_CALIGN compiler option.
Functions with fixed number of arguments can use postfix notation
Use : concatenation symbol to prefer local functions
(a,b):add
(x+y):cos
x:sin
x:sin:sqr + x:cos:sqr // sin2(x) + cos2(x)
Use # concatenation symbol to prefer global functions
(a,b)#add
(x+y)#cos
x#sin
x#sin#sqr + x#cos#sqr // sin2(x) + cos2(x)
SICx calculates at compile time some functions with constant arguments and no-void return value.
For example, the expression sin(logn(2,256)+cos(123)-sqrt(4)*(3-1))
will be replaced in the output code by the single constant 0.0295572548982532
To avoid compile-time calculation, add function (sic_afun) with non-zero dynamic flag.
The list of the argument types for compile-time-calculated functions:
• 0 arguments
func ( void )
• 1 argument
func ( double )
func ( integer )
• 2 arguments
func ( double , double )
func ( double , integer )
func ( integer , integer )
func ( integer , double )
• 3 arguments
func ( double , double , double )
func ( integer , integer , integer )
• 4 arguments
func ( double , double , double , double )
func ( integer , integer , integer , integer )
To evaluate any expression at compile time, start it with ':' symbol
: x=y+z; //
evaluate the expression at compile time
Variable declaration is a kind of compile-time-calculated expressions.
For example, the expression
var x1=(x2=222)+(x3=333),x4;
declares four double variables:
x1 (value = 555)
x2 (value = 222)
x3 (value = 333)
x4 (value = 0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#1
Valid symbols for function, variable or constant name are:
'.', '_', '@', 'A'…'Z', 'a'…'z', '0'…'9'
Name can`t be a single char: '.', '_' or '@'
First symbol can`t be a digit
#2
Maximum length of function name = 49 symbols
Maximum length of constant name = 43 symbols
Maximum length of variable name = 43 symbols
#3
Base type of variables and numbers is 64-bit float
#4
Default memory settings:
• Memory block size = 64K
• Maximum token count = 20480 (single-line expression)
• Maximum rpn item count = 12287 (single-line expression)
• Maximum code size = 256K - 16B*(1 + rpn item count) (single-line expression)
• Maximum code size = 256K (multi-line expression)
#5
Symbols can be delimitered by space symbol
These expressions are different
• (a !> b) ≢ (a! > b)
• (a!! < b) ≢ (a! !< b)
#6
Parentheses are not required if the expression contains a single function
goto(label); is equivalent to
goto label;
call(proc); is equivalent to
call proc;
x = min(a,b); is equivalent to
x = min a,b;
x = min(a,b) + 10; is equivalent to
x = (min a,b) + 10;
#7
Comments in multi-line expression
//…
— single-line comment
/*…*/
— multi-line comment
#8
Use
'!'
'|'
'¦'
'#'
'*'
'+'
'/'
'\'
'•'
leading symbols for code markup in multi-line expressions.
Markup symbols must be followed by space symbol, otherwise markup symbol will be considered as a part of an expression.
#9
Use # prefix symbol to prefer global objects
#somefunc(x) — call procedure with name somefunc from global functions table
Use `` prefix symbols to prefer local objects
#10
Calling conversion for user defined and external functions
x32: cdecl or stdcall
x64: fastcall
#11
SSE-versions of compiler (SICs32.DLL and
SICs64.DLL).
SICs compiler generates mixed code (SSE2, SSE3, SSE4.1, FPU).
There is a number of functions that have only the FPU implementation.
Legend
[+] new
[-] remove
[!] change
[~] change
[@] bug fix
E-mail
maa@maalchemist.ru
maalchemist@yandex.ru
maalchemist@gmail.com