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 | |
parent | 8e605f88e707dd018dac36bc130a3dda874834fb (diff) |
put infnan in there, even though it is depricated
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libm/Makefile | 4 | ||||
-rw-r--r-- | lib/libm/man/infnan.3 | 31 |
2 files changed, 21 insertions, 14 deletions
diff --git a/lib/libm/Makefile b/lib/libm/Makefile index 594e89b4a25..20aec7f1437 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.28 1995/11/20 22:06:19 jtc Exp $ -# $OpenBSD: Makefile,v 1.22 1999/07/18 19:12:59 deraadt Exp $ +# $OpenBSD: Makefile,v 1.23 2000/11/08 20:43:37 deraadt Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -70,7 +70,6 @@ ARCH_SRCS = e_acos.S e_asin.S e_atanh.S e_cosh.S e_exp.S e_log.S e_log10.S \ .PATH: ${.CURDIR}/arch/vax NOIEEE_ARCH=n_infnan.S n_argred.S n_sqrt.S ARCH_SRCS = n_atan2.S n_cabs.S n_cbrt.S n_sincos.S n_tan.S n_support.S -MAN+=infnan.3 .endif .if (${MACHINE_ARCH} == "mvme88k") @@ -147,6 +146,7 @@ MAN+= acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 ceil.3 \ cos.3 cosh.3 erf.3 exp.3 fabs.3 floor.3 fmod.3 hypot.3 ieee.3 \ ieee_test.3 j0.3 lgamma.3 math.3 rint.3 sin.3 sinh.3 sqrt.3 \ tan.3 tanh.3 +MAN+= infnan.3 MLINKS+=erf.3 erfc.3 MLINKS+=exp.3 expm1.3 exp.3 log.3 exp.3 log10.3 exp.3 log1p.3 exp.3 pow.3 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 |