Skip to content

Commit

Permalink
Update chapters/arrays.tex
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Nov 22, 2022
1 parent 0474458 commit 14c2b0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chapters/arrays.tex
Expand Up @@ -1271,7 +1271,7 @@ \subsection{Element-wise Exponentiation}\label{element-wise-exponentiation}
Exponentiation \lstinline!a ^ b! always returns a \lstinline!Real! scalar value, and it is required that \lstinline!a! and \lstinline!b! are scalar \lstinline!Real! or \lstinline!Integer! values.
The result should correspond to mathematical exponentiation (ideally the correctly rounded result based on the inputs) with the following special cases:
\begin{itemize}
\item If $\text{\lstinline!a!} = 0.0$ and $\text{\lstinline!b!} = 0$ for an \lstinline!Integer! expression \lstinline!b! the result is $0.0$.
\item If $\text{\lstinline!a!} = 0.0$ and $\text{\lstinline!b!} = 0$ for an \lstinline!Integer! expression \lstinline!b! the result is $1.0$.
\item If $\text{\lstinline!a!} < 0$ and \lstinline!b! is an \lstinline!Integer! or a \lstinline!Real! having an integer value, the result is defined as $\pm |a|^b$, with sign depending on whether \lstinline!b! is even (positive) or odd (negative).
\item Consequences of other exceptional situations, such as ($\text{\lstinline!a!} = 0.0$ and $\text{\lstinline!b!} = 0.0$ for a \lstinline!Real b!, $\text{\lstinline!a!} = 0.0$ and $\text{\lstinline!b!} < 0$, or $\text{\lstinline!a!} < 0$ and \lstinline!b! does not have an integer value) or overflow are undefined.
\end{itemize}
Expand Down

0 comments on commit 14c2b0c

Please sign in to comment.