aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-05-09 22:47:17 +0200
committerMattias Andrée <maandree@kth.se>2016-05-09 22:47:17 +0200
commitf0aa2f671e01ce36c98f55718cb2ca62c69ac55a (patch)
treee1ab72d36725bf74d18aab5df736144f66e4e2f6 /man
parentNope, that was not the case, just stupid packaging, build it yourself and everything is fine. (diff)
downloadlibzahl-f0aa2f671e01ce36c98f55718cb2ca62c69ac55a.tar.gz
libzahl-f0aa2f671e01ce36c98f55718cb2ca62c69ac55a.tar.bz2
libzahl-f0aa2f671e01ce36c98f55718cb2ca62c69ac55a.tar.xz
n ≠ qd + r, that would just complicate things
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--man/zdivmod.328
1 files changed, 28 insertions, 0 deletions
diff --git a/man/zdivmod.3 b/man/zdivmod.3
index f0cd9e4..7e486d4 100644
--- a/man/zdivmod.3
+++ b/man/zdivmod.3
@@ -30,6 +30,34 @@ gets
Mod
.IR divisor .
.P
+Be aware,
+.I remainder
+gets
+.RI | dividend |
+Mod
+.RI | divisor |,
+this means that it is only guaranteed to be true that
+.I dividend
+=
+.I quotient
+⋅
+.I divisor
++
+.IR remainder
+if
+.I dividend
+and
+.I divisor
+have the same sign.
+It is up to the user, to make the necessary adjustment to
+.I remainder
+to make this true or to satisfy any desired property. This
+exceptional behaviour has been choosen because it is the
+simplies, works just fine if you are working with natural
+numbers only, and there are two many ways to define
+modulus; this one is advantages when you want to make
+adjustments, it is straight-forward.
+.P
It is safe to call
.B zdivmod
with non-unique parameters,