# Numeric, expression, matrix, set and date/time

> How EduBase checks numbers, intervals, mathematical expressions, matrices, sets and dates, with the input syntax, built-in functions and verification options.

These EduBase question types check answers by their mathematical value, not by their text: `0.5`, `1/2` and `2/4` are the same number, and `2*(x+1)` equals `2x+2`. Together with [parameters](https://help.edubase.net/questions/parameters-reference/), they let every participant get different numbers while EduBase still checks every answer. Precision and tolerance are explained in [Tolerance, partial credit, penalties, rubrics and skills](https://help.edubase.net/questions/scoring/#tolerance-for-numbers).

## Numeric

The participant types a number.

- Integers, decimals and simple fractions (`3/4`), and the constants `pi` and `e`.
- Infinity as `INF`, `oo`, `00` or `∞`, with a sign.
- **Interval → Yes (from-to)** asks for an interval instead: "the starting and ending value must be separated by a hyphen", open or closed, for example `1-9`, `[1-9]`, `(1-9)` or `]1-9]`.
- **Precision** sets the decimals compared (2 by default); tolerance can accept answers within a range.

## Expression

The participant types a formula. EduBase checks that it is mathematically equivalent to the correct answer, not that it looks the same.

- Write the expression only, without `y=` or `f(x)=`: for the line *y = mx + b*, the answer is `m*x+b`.
- The variable is `x` by default; add others under **Variables**, such as `y` for `x^2*sin(y)`.
- **Functions**: whether participants may use functions in their answer. Turn it off when asking for the value of `sin(pi)`, so `sin(pi)` itself is not accepted.
- **Extended mode** adds logarithms of any base (`log2(8)`) and factorials (`5!`).

### Built-in functions

| Group | Functions |
|---|---|
| Basic | `sqrt`, `abs`, `round`, `floor`, `ceil` |
| Logarithms | `ln`, `log` (base 10), `log10` |
| Trigonometric | `sin`, `cos`, `tan`, `csc`, `sec`, `arcsin`/`asin`, `arccos`/`acos`, `arctan`/`atan` |
| Hyperbolic | `sinh`, `cosh`, `tanh`, `arcsinh`/`asinh`, `arccosh`/`acosh`, `arctanh`/`atanh` |
| Conversions | `degree2radian`, `radian2degree`, `number2binary`, `binary2number`, `number2octal`, `octal2number`, `number2hexadecimal`, `hexadecimal2number`, `number2roman`, `roman2number` |
| Combinatorics | `factorial`, `permutations` |
| Two arguments, separated by `;` | `min(a;b)`, `max(a;b)`, `mod(n;i)`, `fmod(n;i)`, `div(a;b)`, `intdiv(a;b)`, `gcd(a;b)`, `lcm(a;b)`, `number2base(n;b)`, `base2number(n;b)`, `combinations(n;k)`, `combinations_repetition(n;k)`, `variations(n;k)`, `variations_repetition(n;k)` |

### How equivalence is verified

**Verification type** chooses the method:

| Type | How it checks | Settings |
|---|---|---|
| **RANDOM** (default) | Evaluates both expressions at random values of the variables and compares the results. | **Evaluation iterations** (5 by default); value type (integer, float or automatic); range, and intervals the values must fall inside or outside. |
| **EXPLICIT** | Evaluates the participant's expression at points you give and compares with target values, such as `[0;1]` and `[3;8.89]`. | The points and targets. |
| **COMPARE** | Compares the values of expressions without variables. | |

Restrict random values when the expression is undefined somewhere, for example keep `x` above 0 for `ln(x)`.

## Matrix

The participant types a matrix or a vector, checked element by element: with the numeric rules for a numeric matrix, with the expression rules for a matrix of expressions.

- `[` and `]` around the matrix, `;` between columns, `|` at the end of each row.
- `[1;2;3]` is a 1×3 matrix, `[1|2|3]` a 3×1 matrix, `[1;2|3;4]` a 2×2 matrix, `[x;x+1|x+2;x+3]` a matrix of expressions.

## Set

The participant types an unordered set; order and repetition do not matter. Each element is checked with the numeric rules (numeric set) or the text rules (text set).

- `{` and `}` around the set, `;` between elements: `{1;2;3}`, `{red;green;blue}`.

## Date/time

The participant types a date.

- **Precision**: **Year**, **Month (month, year)** or **Day (month, day, year)**.
- Recommended formats: `YYYY`, `MM.YYYY.` or `MM.DD.YYYY.`, matching the precision.
- **Interval → Yes (from-to)** asks for a date range, such as `1939. September 1 - 1945. September 2.`

## Related

- [Parameter types and constraints](https://help.edubase.net/questions/parameters-reference/)
- [Tolerance, partial credit, penalties, rubrics and skills](https://help.edubase.net/questions/scoring/)
- [Question types at a glance](https://help.edubase.net/questions/types/)
- Images, audio, video, LaTeX and graphs
