# Commands supported by KAlgebra

## plus

- Name: plus

- Description: Addition

- Parameters: plus(... parameters, ...)

- Example: x->x+2

## times

- Name: times

- Description: Multiplication

- Parameters: times(... parameters, ...)

- Example: x->x*2

## minus

- Name: minus

- Description: Subtraction

- Parameters: minus(... parameters, ...)

- Example: x->x-2

## divide

- Name: divide

- Description: Division

- Parameters: divide(par1, par2)

- Example: x->x/2

## quotient

- Name: quotient

- Description: Quotient

- Parameters: quotient(par1, par2)

- Example: x->quotient(x, 2)

## power

- Name: power

- Description: Power

- Parameters: power(par1, par2)

- Example: x->x^2

## root

- Name: root

- Description: Root

- Parameters: root(par1, par2)

- Example: x->root(x, 2)

## factorial

- Name: factorial

- Description: Factorial. factorial(n)=n!

- Parameters: factorial(par1)

- Example: x->factorial(x)

## and

- Name: and

- Description: Boolean and

- Parameters: and(... parameters, ...)

- Example: x->and(x>-2, x<2)

## or

- Name: or

- Description: Boolean or

- Parameters: or(... parameters, ...)

- Example: x->or(x>2, x>-2)

## xor

- Name: xor

- Description: Boolean xor

- Parameters: xor(... parameters, ...)

- Example: x->xor(x>0, x<3)

## not

- Name: not

- Description: Boolean not

- Parameters: not(par1)

- Example: x->not(x)

## gcd

- Name: gcd

- Description: Greatest common divisor

- Parameters: gcd(... parameters, ...)

- Example: x->gcd(x, 3)

## lcm

- Name: lcm

- Description: Least common multiple

- Parameters: lcm(... parameters, ...)

- Example: x->lcm(x, 4)

## rem

- Name: rem

- Description: Remainder

- Parameters: rem(par1, par2)

- Example: x->rem(x, 5)

## factorof

- Name: factorof

- Description: The factor of

- Parameters: factorof(par1, par2)

- Example: x->factorof(x, 3)

## max

- Name: max

- Description: Maximum

- Parameters: max(... parameters, ...)

- Example: x->max(x, 4)

## min

- Name: min

- Description: Minimum

- Parameters: min(... parameters, ...)

- Example: x->min(x, 4)

## lt

- Name: lt

- Description: Less than. lt(a,b)=a<b

- Parameters: lt(par1, par2)

- Example: x->x<4

## gt

- Name: gt

- Description: Greater than. gt(a,b)=a>b

- Parameters: gt(par1, par2)

- Example: x->x>4

## eq

- Name: eq

- Description: Equal. eq(a,b) = a=b

- Parameters: eq(par1, par2)

- Example: x->x=4

## neq

- Name: neq

- Description: Not equal. neq(a,b) = a≠b

- Parameters: neq(par1, par2)

- Example: x->x!=4

## leq

- Name: leq

- Description: Less or equal. leq(a,b) = a≤b

- Parameters: leq(par1, par2)

- Example: x->x<=4

## geq

- Name: geq

- Description: Greater or equal. geq(a,b) = a≥b

- Parameters: geq(par1, par2)

- Example: x->x>=4

## implies

- Name: implies

- Description: Boolean implication

- Parameters: implies(par1, par2)

- Example: x->implies(x<0, x<3)

## approx

- Name: approx

- Description: Approximation. approx(a) = a≈n

- Parameters: approx(par1, par2)

- Example: x->approx(x, 4)

## abs

- Name: abs

- Description: Absolute value. abs(n)=|n|

- Parameters: abs(par1)

- Example: x->abs(x)

## floor

- Name: floor

- Description: Floor value. floor(n) = ⌊n⌋

- Parameters: floor(par1)

- Example: x->floor(x)

## ceiling

- Name: ceiling

- Description: Ceil value. ceil(n) = ⌈n⌉

- Parameters: ceiling(par1)

- Example: x->ceiling(x)

## sin

- Name: sin

- Description: Function to calculate the sine of a given angle

- Parameters: sin(par1)

- Example: x->sin(x)

## cos

- Name: cos

- Description: Function to calculate the cosine of a given angle

- Parameters: cos(par1)

- Example: x->cos(x)

## tan

- Name: tan

- Description: Function to calculate the tangent of a given angle

- Parameters: tan(par1)

- Example: x->tan(x)

## sec

- Name: sec

- Description: Secant

- Parameters: sec(par1)

- Example: x->sec(x)

## csc

- Name: csc

- Description: Cosecant

- Parameters: csc(par1)

- Example: x->csc(x)

## cot

- Name: cot

- Description: Cotangent

- Parameters: cot(par1)

- Example: x->cot(x)

## sinh

- Name: sinh

- Description: Hyperbolic sine

- Parameters: sinh(par1)

- Example: x->sinh(x)

## cosh

- Name: cosh

- Description: Hyperbolic cosine

- Parameters: cosh(par1)

- Example: x->cosh(x)

## tanh

- Name: tanh

- Description: Hyperbolic tangent

- Parameters: tanh(par1)

- Example: x->tanh(x)

## sech

- Name: sech

- Description: Hyperbolic secant

- Parameters: sech(par1)

- Example: x->sech(x)

## csch

- Name: csch

- Description: Hyperbolic cosecant

- Parameters: csch(par1)

- Example: x->csch(x)

## coth

- Name: coth

- Description: Hyperbolic cotangent

- Parameters: coth(par1)

- Example: x->coth(x)

## arcsin

- Name: arcsin

- Description: Arc sine

- Parameters: arcsin(par1)

- Example: x->arcsin(x)

## arccos

- Name: arccos

- Description: Arc cosine

- Parameters: arccos(par1)

- Example: x->arccos(x)

## arctan

- Name: arctan

- Description: Arc tangent

- Parameters: arctan(par1)

- Example: x->arctan(x)

## arccot

- Name: arccot

- Description: Arc cotangent

- Parameters: arccot(par1)

- Example: x->arccot(x)

## arccosh

- Name: arccosh

- Description: Hyperbolic arc cosine

- Parameters: arccosh(par1)

- Example: x->arccosh(x)

## arccsc

- Name: arccsc

- Description: Arc cosecant

- Parameters: arccsc(par1)

- Example: x->arccsc(x)

## arccsch

- Name: arccsch

- Description: Hyperbolic arc cosecant

- Parameters: arccsch(par1)

- Example: x->arccsch(x)

## arcsec

- Name: arcsec

- Description: Arc secant

- Parameters: arcsec(par1)

- Example: x->arcsec(x)

## arcsech

- Name: arcsech

- Description: Hyperbolic arc secant

- Parameters: arcsech(par1)

- Example: x->arcsech(x)

## arcsinh

- Name: arcsinh

- Description: Hyperbolic arc sine

- Parameters: arcsinh(par1)

- Example: x->arcsinh(x)

## arctanh

- Name: arctanh

- Description: Hyperbolic arc tangent

- Parameters: arctanh(par1)

- Example: x->arctanh(x)

## exp

- Name: exp

- Description: Exponent (ex)

- Parameters: exp(par1)

- Example: x->exp(x)

## ln

- Name: ln

- Description: Base-e logarithm

- Parameters: ln(par1)

- Example: x->ln(x)

## log

- Name: log

- Description: Base-10 logarithm

- Parameters: log(par1)

- Example: x->log(x)

## sum

- Name: sum

- Description: Summator

- Parameters: sum(par1 : var=from..to)

- Example: x->x*sum(t*t:t=0..3)

## product

- Name: product

- Description: Productor

- Parameters: product(par1 : var=from..to)

- Example: x->product(t+t:t=1..3)

## diff

- Name: diff

- Description: Differentiation

- Parameters: diff(par1 : var)

- Example: x->(diff(x^2:x))(x)

## card

- Name: card

- Description: Cardinal

- Parameters: card(par1)

- Example: x->card(vector { x, 1, 2 })

## scalarproduct

- Name: scalarproduct

- Description: Scalar product

- Parameters: scalarproduct(... parameters, ...)

- Example: x->selector(1, scalarproduct(vector { 0, x }, vector { x, 0 }))

## selector

- Name: selector

- Description: Select an element from a container

- Parameters: selector(par1, par2)

- Example: x->piecewise { x>0 ? selector(1, vector { x, 1/x }), ? selector(2, vector { x, 1/x }) }

## union

- Name: union

- Description: Joins several items of the same type

- Parameters: union(... parameters, ...)

- Example: x->selector(rem(floor(x), 5)+3, union(list { 1, 2, 3 }, list { 4, 5, 6 }))