-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4cb3d9
commit 6fdcc21
Showing
15 changed files
with
186 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
# Summary | ||
|
||
- [Install](./install.md) | ||
- [Usage](./usage.md) | ||
- [Functions](./function.md) | ||
- [Configuration](./configuration.md) | ||
- [Logic](./logic.md) | ||
- [Plot](./plot.md) | ||
- [Exact math](./exact.md) | ||
# Basic Usage | ||
- [Introduction](./install.md) | ||
- [Chapter I. Usage](./usage.md) | ||
|
||
# Advanced Usage | ||
- [Chapter II. Functions](./function.md) | ||
- [Chapter III. Configuration](./configuration.md) | ||
- [Chapter IV. Logic](./logic.md) | ||
- [Chapter V. Plot](./plot.md) | ||
- [Section V.1. GUI](plot/gui.md) | ||
- [Section V.2. Terminal](plot/term.md) | ||
|
||
# Algebra | ||
- [Chapter VI. Algebra](algebra/index.md) | ||
- [Section VI.1. Vectors](algebra/vectors.md) | ||
- [Section VI.2. Matrices](algebra/matrices.md) | ||
- [Chapter VII. Exact math](exact/index.md) | ||
- [Section VII.1. Rational Reduction](exact/rational.md) | ||
- [Section VII.2. Symbolic Reduction](exact/symbolic.md) | ||
- [Section VII.3. Function differentiation](exact/diff.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Chapter VI. Algebra | ||
|
||
The calculator supports basic algebraic calculations, including | ||
|
||
- Vectors | ||
- Dot product (operator `*` - with another vector.) | ||
- Scalar product (operator `*` - with a scalar.) | ||
- Norm (function `norm`) | ||
- Addition (operator `+`) | ||
- Matrices | ||
- Addition (operator `+`) | ||
- Multiplication (operator `*` - with another matrix.) | ||
- Scalar multiplication (operator `*` - with a scalar.) | ||
- Transposition (function `transpose`) | ||
- Determinant (via _LUP-decomposition_ function `det`) | ||
- Inversion (via _LUP-decomposition_ function `invert`) | ||
|
||
The matrices (and vectors) are pretty printed (and aligned) (since `v2.11.5`) | ||
|
||
![matrix_pretty_printed](/assets/aligned_matrices.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Section VI.2. Matrices | ||
As of `v2.7.0` matrix algebra supports | ||
|
||
- Addition (operator `+`) | ||
- Multiplication (operator `*` - with another matrix.) | ||
- Scalar multiplication (operator `*` - with a scalar.) | ||
- Transposition (function `transpose`) | ||
- Determinant (via _LUP-decomposition_ function `det`) | ||
- Inversion (via _LUP-decomposition_ function `invert`) | ||
|
||
![matrix](/assets/matrix.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Section VI.1. Vectors | ||
Basic vector calculation supports | ||
|
||
- Addition (operator `+`) | ||
- Dot product (operator `*` - with another vector.) | ||
- Scalar product (operator `*` - with a scalar.) | ||
- Norm (function `norm`) | ||
|
||
![vector_calc](/assets/vector.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Section VII.3. Function differentiation | ||
As of `v3.2.0`, the calculator can differentiate both known functions (built-in) | ||
and user-defined functions constructed using known functions and operations. | ||
|
||
<h2 style="color:red;">Warning</h2> | ||
|
||
Beware, as of `v3.3.3` there is some bugs to iron out. It doesn't | ||
differentiate variables (for example `x*x` works but not `x²`). | ||
And differentiation of function referencing each other | ||
(for example `v(x) = f(x) + x*x`) doesn't work either. | ||
|
||
It's currently being fixed, and will be fixed before stable release `v3.4.0` | ||
which is currently in `alpha` development-testing (it will implements basic languages | ||
features | ||
such as flow control and condition.) | ||
|
||
The release `v3.3.4`, which correct those bugs is currently in `beta` dev-testing | ||
and will be released before `v3.4.0`. | ||
|
||
## Examples | ||
### Built-in | ||
![diff_bi](/assets/diff_builtin.png) | ||
|
||
### User defined | ||
![ud](/assets/diff_ud.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Chapter VII. Exact math | ||
|
||
Exact math has been added between version `v2.11.0` to version `v3.3.3` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Section VII.1. Rational Reduction | ||
|
||
As of version `v2.11.0` rational exact math reduction was added, it supports. | ||
|
||
- Rational operations | ||
- `+` | ||
- `-` | ||
- `*` | ||
- `/` | ||
- Rational reductions | ||
- Float rationalization (with 10 digits of precision) | ||
|
||
## Operations | ||
![operations](/assets/exact_rationals.png) | ||
|
||
## In matrices | ||
![matrix](/assets/exact_inverse.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Section VII.2. Symbolic Reduction | ||
|
||
As of `v3.0.0` the support for symbolic reduction has been added to calc. | ||
It supports multi-variables multi-operations reductions, you can reduce | ||
expressions using it, fair warning, it uses _a lot_ of parentheses | ||
|
||
![symbolic reduction](/assets/multi_variable.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
# Logic | ||
# Chapter IV. Logic | ||
|
||
## Infix Operators | ||
|
||
- `or` (alias `||`) | ||
- `and` (alias `&&`) | ||
- `geq` (alias `>=`) | ||
- `leq` (alias `<=`) | ||
- `gt` (alias `>`) | ||
- `lt` (alias `<`) | ||
|
||
![example](/assets/logic.png) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
# Plot | ||
# Chapter V. Plot | ||
|
||
You can plot, provided you have `gnuplot` installed, | ||
which the backend relies on. | ||
|
||
It works great on Linux and macOS, but it's not tested on Windows. | ||
|
||
## Help | ||
As the `plot` function is a little difficult you can call it without | ||
parameters to show the help `plot()` | ||
|
||
![plot_help](/assets/plot_help.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Section V.1. GUI | ||
|
||
## Default | ||
|
||
To plot a function `f` you just need to do `plot(f)` | ||
|
||
![plot_default](/assets/plot_cos_default.png) | ||
|
||
## Options | ||
You can pass parameters to the function. | ||
|
||
``` | ||
> plot(sin,-pi,pi,0.01,"sin","x(rad)","y","line") | ||
``` | ||
|
||
Let's unpack, we have ploting the `sin` function, from `x=-pi` to `x=pi` | ||
with a step of `0.01 rad`, the title of the graph is `sin`, the x_axis | ||
label is `x(rad)`, the y_axis label is `y` and we want a line. | ||
|
||
![plot_custom](/assets/plot_sin_custom.png) | ||
|
||
## User-defined functions | ||
You can plot your own functions with the same call. | ||
Here is the example for `f(x) = x*x` | ||
|
||
![plot_f](/assets/plot_f.png) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Section V.2. Terminal | ||
You can also plot right into the terminal, without need for the `gnuplot` | ||
backend. | ||
|
||
## Default | ||
The best example to show it to you (before the auto-scaling) is the square | ||
function, from `x=-5` to `x=5` with a step of `0.1`. | ||
|
||
![plot_term](/assets/plot_term_x_squared.png) | ||
|
||
## Options | ||
Like the GUI plotting, the terminal supports options | ||
|
||
![plot_term_option](/assets/plot_term_x_squared_labels.png) | ||
|
||
## Auto scaling | ||
Both the `x` and `y` axis supports _auto-scaling_ | ||
|
||
![plot_term_scaling](/assets/termplot_cos.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Usage | ||
# Chapter I. Usage | ||
|
||
## Basic Operators | ||
|
||
|