blob: ccc3a5f1a2b86f9eb97f5b87744e8367cef557a7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# qc
qc is a minimalist desktop calculator app written
in blazingly fast™ Rust.

## Syntax
All of your favorite mathematical operators are supported:
- `+`: add
- `-`: subtract
- `*`: multiply
- `/`: divide
- `//`: computes integer division between two numbers. If the arguments
are not both integers, equivalent to `trunc(x/y)`
- `%`: modulo
- `^`: exponentiation
Adjacent terms are multiplied:
- `2pi`
- `(4 + 5)(6 + 7)`
### Functions
There are also a number of numerical functions:
- `sqrt`
- `log` (or `ln`, `log2` and `log10` also available)
- `sin`
- `cos`
- `tan`
- `asin` (or `arcsin`)
- `acos` (or `acos`)
- `atan` (or `arctan`)
- `floor`
- `ceil` (or `ceiling`)
- `round`
- `trunc` (or `truncate`)
- `abs`
Parentheses are optional when calling a function:
- `cos pi` (equivalent to `cos(pi)`)
- `cos 2pi` (equivalent to `(cos(2))*pi`)
|