diff --git a/README.md b/README.md index 071df4d..5c1c5ae 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,56 @@ ![](./misc/banner.png) -A high-precision partially-symbolic calculator with support for units, derivatives, and more. +A high-precision scientific calculator with support for units, derivatives, and more. -This is nowhere near complete. Stay tuned. +**todo:** ~~Try the [web version!]()~~ + +Many features are missing, this is still under development. -# TODO - -## Before For 1.0 release - - Commands - - Documentation (usage) - - Documentation (comments) - - Units +# Features + - Extremely high precision + - Uses a rational datatype when possible, + - Uses a high-precision float when not. + - Pretty printing in prompt + - Makes expressions shorter and easier to understand + - **todo:** ~~Supports nearly all physical units~~ + - ~~Accounts for units in calculations~~ + - ~~Explicit conversion operator `->` or `to`~~ + - **todo:** ~~Variable and function definitions~~ + - **todo:** ~~Easy history recall~~ + - **todo:** ~~Sums and products~~ -## General - - CLI Options: version, help, evaluate - - Compile to WASM => webapp - - Trig tests - - Fix tests - - Direct expression printing - - Better comparison +# Reference +## **Operators, sorted by priority (high to low)** -## Internals - - Copy expression - - Non-recursive treeify - - Faster factorial function. Maybe use gamma instead? - - Remove extra calls to `.clone()` - - Arbitrary precision float (rug doesn't offer arbitrary exponents) +| Operator | Syntax | +|---------------------------|----------------------| +| function application | `sin`, `cos`, etc | +| factorial | `!` | +| powers | `^`, `**` | +| implicit multiplication | `3π`, `3(2+1)`, etc | +| square root | `sqrt`, `rt`, `√` | +| negation | `-3`, `-(1 + 2)` | +| modulo (short) | `%` | +| multiplication, division | `*`, `/`, `×`, `÷` | +| addition, subtraction | `+`, `-` | +| modulo (long) | `mod` | -## Features - - Variable definitions - - Function definitions - - Units - - Dice - - Mean, Median, Min, Max: arrays and multi-arg functions - - Derivatives - - MiniCAS - - Complex numbers - - Config file - - History to file - - Reference previous results - - acot/acoth functions +Note that implicit multiplication has a higher priority than mulitiplication and division. -## Prompt - - Live syntax/output \ No newline at end of file +## **Functions** + +| Function | Syntax | +|---------------------------|-----------------------------| +| Absolute Value | `abs` | +| Floor, Ceiling, Round | `floor`, `ceil`, `round` | +| Logarithm (base e) | `ln` | +| Logarithm (base 10) | `log` | +| sin, arcsin, cosecant | `sin`, `asin`, `csc` | +| cos, arccos, secant | `cos`, `acos`, `sec` | +| tan, arctan, cotan | `tan`, `atan`, `cot` | +| hyperbolic sin, etc | `sinh`, `asinh`, `csch` | +| hyperbolic cos, etc | `cosh`, `acosh`, `sech` | +| hyperbolic tan, etc | `tanh`, `atanh`, `coth` | \ No newline at end of file diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..79ded5d --- /dev/null +++ b/TODO.md @@ -0,0 +1,51 @@ +# TODO + +Roadmap for fixes and features. + +## Pre-release + - Commands (help, clear, reset, quit, list constants, list units) + - Documentation (usage) + - Documentation (comments) + - Units, unit conversion + +## General + - CLI Options: version, help, evaluate + - Compile to WASM, publish a webapp + - Better tests + - Direct expression printing + - Better comparison + - Trigonometry + - Manpage + + +## Internals + - Non-recursive treeify + - Faster factorial function. Maybe use gamma instead? + - Remove extra calls to `.clone()` + - Arbitrary precision float (rug doesn't offer arbitrary exponents) + + +## Math Features + - Config file + - History to file + - Reference previous results + - Variable definitions + - Function definitions + - Units + - Dice + - Mean, Median, Min, Max: arrays and multi-argument functions + - Arbitrary base logarithm + - Derivatives + - CAS features (trig, roots and powers) + - Complex numbers + - acot/acoth functions + - Binary, hex, octal numbers + - Extra roots? (for convenience) + - Sums and products + - "per" as division? + + +## Prompt + - Live syntax/output (like firefox js terminal) + - fish-style tab completion + - Numbered expressions, history recall \ No newline at end of file