From 5eb5cf2109970b5987ade0c9647ec26788d453ac Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Tue, 25 Jan 2022 22:31:29 +0100 Subject: [PATCH] Simplify heading to increase visibility of its important part --- chapters/arrays.tex | 2 +- chapters/interface.tex | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/chapters/arrays.tex b/chapters/arrays.tex index fc98f2a27..d12847f34 100644 --- a/chapters/arrays.tex +++ b/chapters/arrays.tex @@ -1222,7 +1222,7 @@ \subsection{Multiplication of Matrices and Vectors}\label{matrix-and-vector-mult \end{lstlisting} \end{example} -\subsection{Division of Scalars or Numeric Arrays by Numeric Scalars}\label{division-of-scalars-or-numeric-arrays-by-numeric-scalars} +\subsection{Division by Numeric Scalars}\label{division-by-numeric-scalars} Division \lstinline!a / s! of numeric scalars, vectors, matrices, or arrays \lstinline!a! and numeric scalars \lstinline!s! is defined element-wise. The result is always of \lstinline!Real! type. In order to get integer division with truncation, use the function \lstinline!div!. diff --git a/chapters/interface.tex b/chapters/interface.tex index 46b09613f..cefe63676 100644 --- a/chapters/interface.tex +++ b/chapters/interface.tex @@ -604,12 +604,8 @@ \section{Type Compatible Expressions}\label{type-compatible-expressions} If \lstinline!A! is a \lstinline!Real! expression then \lstinline!B! must be a \lstinline!Real! or \lstinline!Integer! expression and the type compatible expression is \lstinline!Real!, compare \cref{standard-type-coercion}. \item - If \lstinline!A! is an \lstinline!Integer! expression then \lstinline!B! must be a \lstinline!Real! or \lstinline!Integer! - expression. For exponentiation and division the type compatible - expression is \lstinline!Real! (even if both \lstinline!A! and \lstinline!B! are \lstinline!Integer!) see \cref{exponentiation-of-scalars-of-numeric-elements} - and \cref{division-of-scalars-or-numeric-arrays-by-numeric-scalars}, in - other cases the type compatible expression is \lstinline!Real! or \lstinline!Integer! (same as - \lstinline!B!), compare \cref{standard-type-coercion}. + If \lstinline!A! is an \lstinline!Integer! expression then \lstinline!B! must be a \lstinline!Real! or \lstinline!Integer! expression. + For exponentiation and division the type compatible expression is \lstinline!Real! (even if both \lstinline!A! and \lstinline!B! are \lstinline!Integer!) see \cref{exponentiation-of-scalars-of-numeric-elements} and \cref{division-by-numeric-scalars}, in other cases the type compatible expression is \lstinline!Real! or \lstinline!Integer! (same as \lstinline!B!), compare \cref{standard-type-coercion}. \item If \lstinline!A! is a \lstinline!Boolean! expression then \lstinline!B! must be a \lstinline!Boolean! expression and the type compatible expression is \lstinline!Boolean!.