Module kilac::kipac
[−]
[src]
This module provides Kipa-compatible calculations.
Kipa currently supports following functions:
text 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)
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) (all minimums 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 ex |
floor |
Takes floor of a number |
interpoloi |
Raw interpolation. Shouldn't be used in kila-forms. |
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 maximum 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. |