diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-05-11 18:22:11 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-05-11 18:25:15 +0200 |
| commit | 0703ea9ea4155d59d1356713789c60f5e6e8c7a6 (patch) | |
| tree | 77b55910f77563e4fc2c8ba77351ebaba876d602 /doc/refsheet.tex | |
| parent | Fix typo (diff) | |
| download | libzahl-0703ea9ea4155d59d1356713789c60f5e6e8c7a6.tar.gz libzahl-0703ea9ea4155d59d1356713789c60f5e6e8c7a6.tar.bz2 libzahl-0703ea9ea4155d59d1356713789c60f5e6e8c7a6.tar.xz | |
Always satisfy n=qd+r to avoid confusion
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'doc/refsheet.tex')
| -rw-r--r-- | doc/refsheet.tex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/refsheet.tex b/doc/refsheet.tex index 7680629..045b44c 100644 --- a/doc/refsheet.tex +++ b/doc/refsheet.tex @@ -47,18 +47,18 @@ Unless specified otherwise, returns are {\tt void} and all parameters are of typ \entry{zadd(a, b, c)} {$a \gets b + c$} {} \entry{zsub(a, b, c)} {$a \gets b - c$} {} \entry{zmul(a, b, c)} {$a \gets b \cdot c$} {} -\entry{zmodmul(a, b, c, d)} {$a \gets b \cdot c \mod d$} {$0 \le a < \ab{d}$} +\entry{zmodmul(a, b, c, d)} {$a \gets b \cdot c \mod d$} {$0 \le a~\mbox{sgn}~bc < \ab{d}$} \entry{zdiv(a, b, c)} {$a \gets b / c$} {rounded towards zero} \entry{zdivmod(a, b, c, d)} {$a \gets c / d$} {rounded towards zero} -\entry{zdivmod(a, b, c, d)} {$b \gets c \mod d$} {$0 \le b < \ab{d}$} -\entry{zmod(a, b, c)} {$a \gets b \mod c$} {$0 \le a < \ab{c}$} +\entry{zdivmod(a, b, c, d)} {$b \gets c \mod d$} {$0 \le b~\mbox{sgn}~c < \ab{d}$} +\entry{zmod(a, b, c)} {$a \gets b \mod c$} {$0 \le a~\mbox{sgn}~b < \ab{c}$} %\entry{zdiv\_exact(a, b, c)} {$a \gets b / c$} {assumes $c \vert d$} \entry{zsqr(a, b)} {$a \gets b^2$} {} \entry{zmodsqr(a, b, c)} {$a \gets b^2 \mod c$} {$0 \le a < \ab{c}$} \entry{zsqr(a, b)} {$a \gets b^2$} {} \entry{zpow(a, b, c)} {$a \gets b^c$} {} \entry{zpowu(a, b, c)} {$a \gets b^c$} {{\tt c} is an \ullong{}} -\entry{zmodpow(a, b, c, d)} {$a \gets b^c \mod d$} {$0 \le a < \ab{d}$} +\entry{zmodpow(a, b, c, d)} {$a \gets b^c \mod d$} {$0 \le a~\mbox{sgn}~b^c < \ab{d}$} \entry{zmodpowu(a, b, c, d)} {$a \gets b^c \mod d$} {ditto, {\tt c} is an \ullong{}} \entry{zabs(a, b)} {$a \gets \ab{b}$} {} \entry{zneg(a, b)} {$a \gets -b$} {} |
