aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-13 23:54:56 +0100
committerMattias Andrée <maandree@kth.se>2016-03-13 23:54:56 +0100
commit5b10b24044b3350a19ab3d3c0b37b5e9c12365b1 (patch)
tree3f6aa8de29becc5d7511fcca50e6d31982c1b64b /man
parentOptimisations (diff)
downloadlibzahl-5b10b24044b3350a19ab3d3c0b37b5e9c12365b1.tar.gz
libzahl-5b10b24044b3350a19ab3d3c0b37b5e9c12365b1.tar.bz2
libzahl-5b10b24044b3350a19ab3d3c0b37b5e9c12365b1.tar.xz
Multiple changes:
1) Compile test with -O0, it takes too long otherwise. 2) Add error codes: ZERROR_0_POW_0, ZERROR_0_DIV_0, ZERROR_DIV_0, ZERROR_NEGATIVE. 3) Add workaround for a bug in clang (src/allocator.c). 4) Cleanups. 5) Minor optimisations. 6) Add inclusion guard for zahl.h. Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'man')
-rw-r--r--man/zerror.343
1 files changed, 43 insertions, 0 deletions
diff --git a/man/zerror.3 b/man/zerror.3
index 837b3df..8bc0e53 100644
--- a/man/zerror.3
+++ b/man/zerror.3
@@ -37,5 +37,48 @@ The error is stored in
(The error may not be stored in
.I errno
until this function is called.)
+.TP
+.B ZERROR_0_POW_0
+An attempt to calculate the zeroth power of zero was made.
+This is on indeterminate form and cannot be calculated.
+The closest matching
+.I errno
+value is
+.BR EDOM .
+.TP
+.B ZERROR_0_DIV_0
+An attempt to divide zero by zero was made.
+This is on indeterminate form and cannot be calculated.
+The closest matching
+.I errno
+value is
+.BR EDOM .
+.TP
+.B ZERROR_DIV_0
+An attempt to divide a non-zero value by zero was made.
+This is undefined and cannot be calculated.
+This occurs if a divisor or a modulator is zero, or if
+zero is raised to a negative number.
+The closest matching
+.I errno
+value is
+.BR EDOM .
+.TP
+.B ZERROR_NEGATIVE
+A function argument that must not be negative was negative.
+The closest matching
+.I errno
+values is
+.B EDOM
+and
+.BR EINVAL .
+.SH RETURN VALUE
+.B zerror
+returns the error that caused libzahl a function to fail.
+.SH NOTES
+.I errno
+is only set if
+.B ZERROR_ERRNO_SET
+is returned.
.SH SEE ALSO
.BR zperror (3)