From f20b6a1e8fe20806e7da7d027172dede7fd0efb3 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 26 Feb 2018 17:55:17 +0100 Subject: [PATCH] [math] Document scientific notation --- doc_src/math.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc_src/math.txt b/doc_src/math.txt index 48ab59c0d..2a3ea5fbe 100644 --- a/doc_src/math.txt +++ b/doc_src/math.txt @@ -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: