aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-02 21:07:08 +0100
committerMattias Andrée <maandree@kth.se>2016-03-02 21:07:08 +0100
commit3ae8c069900514c1785fe4a84b6cdb0157dff59e (patch)
treeaec0c146010be40239c1582a8b8ae6e7b28aa045 /man
parentAdd zgcd (diff)
downloadlibzahl-3ae8c069900514c1785fe4a84b6cdb0157dff59e.tar.gz
libzahl-3ae8c069900514c1785fe4a84b6cdb0157dff59e.tar.bz2
libzahl-3ae8c069900514c1785fe4a84b6cdb0157dff59e.tar.xz
Add zand, zor, zxor, znot, zbtest, zsplit, and the newly introduced ztrunc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'man')
-rw-r--r--man/zinit.31
-rw-r--r--man/zlsh.31
-rw-r--r--man/zrsh.31
-rw-r--r--man/zset.33
-rw-r--r--man/ztrunc.339
5 files changed, 44 insertions, 1 deletions
diff --git a/man/zinit.3 b/man/zinit.3
index a4e72a2..bbae9e3 100644
--- a/man/zinit.3
+++ b/man/zinit.3
@@ -43,6 +43,7 @@ typedef struct {
.BR znot (3),
.BR zlsh (3),
.BR zrsh (3),
+.BR ztrunc (3),
.BR zsplit (3),
.BR zadd (3),
.BR zsub (3),
diff --git a/man/zlsh.3 b/man/zlsh.3
index a1ff3e9..a9c993c 100644
--- a/man/zlsh.3
+++ b/man/zlsh.3
@@ -25,6 +25,7 @@ with
.BR zxor (3),
.BR znot (3),
.BR zrsh (3),
+.BR ztrunc (3),
.BR zsplit (3),
.BR zbtest (3),
.BR zlsb (3),
diff --git a/man/zrsh.3 b/man/zrsh.3
index 53ae17b..8e06180 100644
--- a/man/zrsh.3
+++ b/man/zrsh.3
@@ -25,6 +25,7 @@ with
.BR zxor (3),
.BR znot (3),
.BR zlsh (3),
+.BR ztrunc (3),
.BR zsplit (3),
.BR zbtest (3),
.BR zlsb (3),
diff --git a/man/zset.3 b/man/zset.3
index b171ca8..5930edb 100644
--- a/man/zset.3
+++ b/man/zset.3
@@ -25,4 +25,5 @@ remains unchanged.
.BR zsets (3),
.BR zswap (3),
.BR zabs (3),
-.BR zneg (3)
+.BR zneg (3),
+.BR ztrunc (3)
diff --git a/man/ztrunc.3 b/man/ztrunc.3
new file mode 100644
index 0000000..7617b74
--- /dev/null
+++ b/man/ztrunc.3
@@ -0,0 +1,39 @@
+.TH ZTRUNC 3 libzahl
+.SH NAME
+ztrunc - Truncate a big integer
+.SH SYNOPSIS
+.nf
+#include <zahl.h>
+
+void ztrunc(z_t \fIa\fP, z_t \fIb\fP, size_t \fIbits\fP);
+.fi
+.SH DESCRIPTION
+.B ztrunc
+makes a truncated copy of
+.I b
+and stores it in
+.I a .
+Only the first
+.I bits
+from
+.I b
+and
+.IR b 's
+sign is copied to
+.I a .
+.P
+It is safe to call
+.B zsplit
+with non-unique parameters.
+.SH RATIONALE
+This was useful for improving the performance of
+.BR zsplit (3).
+.SH SEE ALSO
+.BR zand (3),
+.BR zor (3),
+.BR zxor (3),
+.BR znot (3),
+.BR zlsh (3),
+.BR zrsh (3),
+.BR zsplit (3),
+.BR zbits (3)