summaryrefslogtreecommitdiffstats
path: root/lib/libm/man
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2000-11-08 20:43:37 +0000
committerderaadt <deraadt@openbsd.org>2000-11-08 20:43:37 +0000
commit30c90f9fb83c5e37ae3e7e4f673ddc67bb0182ff (patch)
tree2a34c3e2d585d5b9fe1bbdc521d07d2133d7adac /lib/libm/man
parentUVM (diff)
downloadwireguard-openbsd-30c90f9fb83c5e37ae3e7e4f673ddc67bb0182ff.tar.xz
wireguard-openbsd-30c90f9fb83c5e37ae3e7e4f673ddc67bb0182ff.zip
put infnan in there, even though it is depricated
Diffstat (limited to 'lib/libm/man')
-rw-r--r--lib/libm/man/infnan.331
1 files changed, 19 insertions, 12 deletions
diff --git a/lib/libm/man/infnan.3 b/lib/libm/man/infnan.3
index 7d16f7e83e8..f73f2664abe 100644
--- a/lib/libm/man/infnan.3
+++ b/lib/libm/man/infnan.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: infnan.3,v 1.4 1999/07/09 13:35:27 aaron Exp $
+.\" $OpenBSD: infnan.3,v 1.5 2000/11/08 20:43:38 deraadt Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -128,7 +128,7 @@ to return. And a C program to
implement that suggestion follows.
.sp 0.5
.Bd -filled -offset indent
-.Bl -column "IEEE Signal" "IEEE Default" XXERANGE ERANGEXXorXXEDOM
+.Bl -column "IEEE Sig" "IEEE Default" XXERANGE ERANGExEDOM
.It IEEE Signal IEEE Default Ta
.Fa iarg Ta
.Va errno Ta
@@ -138,7 +138,7 @@ implement that suggestion follows.
.It Overflow \(+-\*(If Ta
.Dv ERANGE ERANGE HUGE
.It Div\-by\-0 \(+-Infinity Ta
-.Dv \(+-ERANGE ERANGE or EDOM \(+-HUGE
+.Dv \(+-ERANGE ERANGE/EDOM \(+-HUGE
.It ( Ns Dv HUGE No "= 1.7e38 ... nearly 2.0**127)"
.El
.Ed
@@ -146,16 +146,23 @@ implement that suggestion follows.
ALTERNATIVE
.Fn infnan :
.Bd -literal -offset indent
-#include <math.h>
-#include <errno.h>
-extern int errno ;
-double infnan(iarg)
-int iarg ;
+#include <math.h>
+#include <errno.h>
+
+double
+infnan(iarg)
+int iarg;
{
- switch(iarg) {
- case \0ERANGE: errno = ERANGE; return(HUGE);
- case \-ERANGE: errno = EDOM; return(\-HUGE);
- default: errno = EDOM; return(0);
+ switch (iarg) {
+ case \0ERANGE:
+ errno = ERANGE;
+ return (HUGE);
+ case \-ERANGE:
+ errno = EDOM;
+ return (\-HUGE);
+ default:
+ errno = EDOM;
+ return (0);
}
}
.Ed