aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/math.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc_src/math.txt')
-rw-r--r--doc_src/math.txt22
1 files changed, 8 insertions, 14 deletions
diff --git a/doc_src/math.txt b/doc_src/math.txt
index 9904a2cc..994f1515 100644
--- a/doc_src/math.txt
+++ b/doc_src/math.txt
@@ -2,25 +2,19 @@
\section math math - Perform mathematics calculations
\subsection math-synopsis Synopsis
- <tt>math EXPRESSION</tt>
+\fish{synopsis}
+math EXPRESSION
+\endfish
\subsection math-description Description
-\c math is used to perform mathematical calculations. It is a very
-thin wrapper for the bc program, which makes it possible to specify an
-expression from the command line without using non-standard extensions
-or a pipeline.
+`math` is used to perform mathematical calculations. It is a very thin wrapper for the bc program, which makes it possible to specify an expression from the command line without using non-standard extensions or a pipeline.
+
+For a description of the syntax supported by math, see the manual for the bc program. Keep in mind that parameter expansion takes place on any expressions before they are evaluated. This can be very useful in order to perform calculations involving shell variables or the output of command substitutions, but it also means that parenthesis have to be escaped.
-For a description of the syntax supported by math, see the manual for
-the bc program. Keep in mind that parameter expansion takes place on
-any expressions before they are evaluated. This can be very useful in
-order to perform calculations involving environment variables or the
-output of command substitutions, but it also means that parenthesis
-have to be escaped.
\subsection math-example Examples
-<code>math 1+1</code> outputs 2.
+`math 1+1` outputs 2.
-<code>math $status-128</code> outputs the numerical exit status of the
-last command minus 128.
+`math $status-128` outputs the numerical exit status of the last command minus 128.