Skip to content

Commit

Permalink
Update chapters/arrays.tex
Browse files Browse the repository at this point in the history
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
  • Loading branch information
HansOlsson and henrikt-ma authored Nov 22, 2022
1 parent 1bc5f02 commit 82bdeda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chapters/arrays.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1275,8 +1275,9 @@ \subsection{Element-wise Exponentiation}\label{element-wise-exponentiation}
\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}
Except for defining the special case of $0.0^0$ it corresponds to \lstinline[language=C]!pow(double a, double b)! in the ANSI~C library.

\begin{nonnormative}
Except for defining the special case of $0.0^0$ it corresponds to \lstinline[language=C]!pow(double a, double b)! in the ANSI~C library.
The result is always \lstinline!Real! due to the potential for integer overflow and negative exponents.
Treating an \lstinline!Integer! exponent special imply that we can freely use $x^n$ in a power-series.
\end{nonnormative}
Expand Down

0 comments on commit 82bdeda

Please sign in to comment.