diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-11-08 20:43:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-11-08 20:43:39 +0000 |
commit | 02f3e184c7a2821566b49df2a5fdf48a9debd5ef (patch) | |
tree | 376fdc9be9393dc47a8bec501f454645d9130386 /lib/libm/man | |
parent | 8e605f88e707dd018dac36bc130a3dda874834fb (diff) |
put infnan in there, even though it is depricated
Diffstat (limited to 'lib/libm/man')
-rw-r--r-- | lib/libm/man/infnan.3 | 31 |
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 |