mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
[math] Document scientific notation
This commit is contained in:
parent
642a1db4fc
commit
f20b6a1e8f
1 changed files with 22 additions and 0 deletions
|
@ -19,6 +19,28 @@ The following options are available:
|
|||
|
||||
If the expression is successfully evaluated the return `status` is zero (success) else one.
|
||||
|
||||
\subsection math-syntax
|
||||
|
||||
`math` knows some operators, constants, functions and can (obviously) read numbers.
|
||||
|
||||
For numbers, `.` is always the radix character regardless of locale - `2.5`, not `2,5`. Scientific notation (`10e5`) is also available.
|
||||
|
||||
\subsection math-operators
|
||||
|
||||
`math` knows the following operators:
|
||||
|
||||
- `+` for addition and `-` for subtraction.
|
||||
|
||||
- `*` for multiplication, `/` for division.
|
||||
|
||||
- `^` for exponentiation.
|
||||
|
||||
- `%` for modulo.
|
||||
|
||||
- `(` and `)` for grouping.
|
||||
|
||||
They are all used in an infix manner - `5 + 2`, not `+ 5 2`.
|
||||
|
||||
\subsection math-constants
|
||||
|
||||
`math` knows the following constants:
|
||||
|
|
Loading…
Reference in a new issue