2
0
Fork 0
forked from zynk/zynk

update README with !calc pi() docs and date requirement

This commit is contained in:
Johannes Findeisen 2026-07-20 03:37:17 +02:00
commit 9ab428ef9a

View file

@ -28,6 +28,7 @@ A single-file IRC bot in C. Features a key-value store backed by SQLite3, weathe
- `libsqlite3` (loaded at runtime via `dlopen`)
- `curl` (for weather, forecast, and stock lookups)
- `bc` (for the calculator command)
- `date` (for timezone-aware time lookups)
- `opencode` (for AI queries)
## Build
@ -155,6 +156,14 @@ The calculator uses `bc -l` (POSIX arbitrary-precision calculator with the math
| `!calc 2^10` | `1024` |
| `!calc 3^3` | `27` |
**Constants:**
| Expression | Description |
|---|---|
| `!calc pi()` | Pi (3.14159...) |
| `!calc pi()*2` | Circumference of a unit circle |
| `!calc pi()^2` | Pi squared |
**Math library functions** (enabled by `-l`):
| Expression | Description |