aboutsummaryrefslogtreecommitdiffstats
path: root/man/ztrunc.3
diff options
context:
space:
mode:
Diffstat (limited to 'man/ztrunc.3')
-rw-r--r--man/ztrunc.339
1 files changed, 39 insertions, 0 deletions
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)