Module kilac::kipac [] [src]

This module provides Kipa-compatible calculations. Kipa currently supports following functions:

aikavali(a, b)
abs(x)
log(x)
ln(x)
floor(x)
ceil(x)
sqrt(x)
exp(x)
mod(x, y)
pow(x,y)
interpoloi(x,x1,y1,x2,(y2=0))
min(X)
max(X)
sum(X)
med(X)
kesk(X)
if(cond, true, false)

Operators supported are

+
-
*
/
<
>
==
!=
<=
>=

And finally these examples are known to work

a+b+c (Sum)
1/a (inverse number)
a (teams input)
.a (all series inputs)
.a.vartio (input of a team)
min(.a) (minimum of all series inputs)
muk and ..mukana (all inputs of teams that belong to competition)
max(.a*muk) (maximum of all teams that are in the competition)
vartio (teams number)
.b.a.vartio (input a for team from subtask b)
..start.c.a.vartio (input a for team from subtask c from task start)

In addition to these Kilac supports other operators too.

Functions

abs

Returns absolute value of a number.

aikavali

Function aikavali calculates the time difference between two inputs in seconds across two dates.

ceil

Takes ceil of a number

exp

exp(x) or e^x

floor

Takes floor of a number

interpoloi

Raw interpolation.

kmod

Modulo of numbers a and b

ln

Takes natural logarithm of a number.

log

Takes log(x, 10)

max

Returns maximum value of f64 vector.

mean

Takes mean of vector

median

Calculates median of a vector

min

Returns minimum value of f64 vector.

pow

Raises number a to power of b

sqrt

Takes square root of number

sum

Takes sum of all values in a vector.