Skip to content

Commit

Permalink
Add remark about integer division operations
Browse files Browse the repository at this point in the history
  • Loading branch information
kwxm committed Apr 24, 2019
1 parent 05f651d commit 6aa4abc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions plutus-core-spec/plutus-core-specification.tex
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,14 @@ \section{Built in types, functions, and values}
the value \texttt{(error)}.
\item We provide two versions of the division and remainder operations
for integers. These differ in their treatment of negative
arguments\footnote{The standard mathematical definition is
as follows: if $n,d \in \mathbb{Z}$ and $d \ne 0$ then there exist
unique integers $q, r \in \mathbb{Z}$ such that $n=qb+r$ and $0 \le r < \lvert d \rvert$;
$q$ is the \textit{quotient} and $r$ is the \textit{remainder}. Neither of
our sets of operations implements this definition!}:
arguments\footnote{The standard mathematical definition (the
so-called \textit{division algorithm}, or \textit{Euclidean
division}) is as follows: if $n,d \in \mathbb{Z}$ and $d \ne 0$ then
there exist unique integers $q, r \in \mathbb{Z}$ such that $n=qb+r$
and $0 \le r < \lvert d \rvert$; $q$ is the \textit{quotient} and
$r$ is the \textit{remainder}. Neither of our sets of operations
implements this definition! This could conceivably be problematic if we
ever need to do number-theoretic calculations.}:

\begin{itemize}

Expand Down

0 comments on commit 6aa4abc

Please sign in to comment.