diff options
Diffstat (limited to 'usr/src/man/man3m')
108 files changed, 11367 insertions, 0 deletions
diff --git a/usr/src/man/man3m/Makefile b/usr/src/man/man3m/Makefile new file mode 100644 index 0000000000..32343dddf7 --- /dev/null +++ b/usr/src/man/man3m/Makefile @@ -0,0 +1,130 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet +# at http://www.illumos.org/license/CDDL. +# + +# Copyright (c) 2012, Igor Kozhukhov <ikozhukhov@gmail.com> + +include ../../Makefile.master + +MANSECT = 3m + +MANFILES = acos.3m \ + acosh.3m \ + asin.3m \ + asinh.3m \ + atan.3m \ + atan2.3m \ + atanh.3m \ + cabs.3m \ + cacos.3m \ + cacosh.3m \ + carg.3m \ + casin.3m \ + casinh.3m \ + catan.3m \ + catanh.3m \ + cbrt.3m \ + ccos.3m \ + ccosh.3m \ + ceil.3m \ + cexp.3m \ + cimag.3m \ + clog.3m \ + conj.3m \ + copysign.3m \ + cos.3m \ + cosh.3m \ + cpow.3m \ + cproj.3m \ + creal.3m \ + csin.3m \ + csinh.3m \ + csqrt.3m \ + ctan.3m \ + ctanh.3m \ + erf.3m \ + erfc.3m \ + exp.3m \ + exp2.3m \ + expm1.3m \ + fabs.3m \ + fdim.3m \ + feclearexcept.3m \ + fegetenv.3m \ + fegetexceptflag.3m \ + fegetround.3m \ + feholdexcept.3m \ + feraiseexcept.3m \ + fesetprec.3m \ + fetestexcept.3m \ + feupdateenv.3m \ + fex_merge_flags.3m \ + fex_set_handling.3m \ + fex_set_log.3m \ + floor.3m \ + fma.3m \ + fmax.3m \ + fmin.3m \ + fmod.3m \ + fpclassify.3m \ + frexp.3m \ + hypot.3m \ + ilogb.3m \ + isfinite.3m \ + isgreater.3m \ + isgreaterequal.3m \ + isinf.3m \ + isless.3m \ + islessequal.3m \ + islessgreater.3m \ + isnan.3m \ + isnormal.3m \ + isunordered.3m \ + j0.3m \ + ldexp.3m \ + lgamma.3m \ + llrint.3m \ + llround.3m \ + log.3m \ + log10.3m \ + log1p.3m \ + log2.3m \ + logb.3m \ + lrint.3m \ + lround.3m \ + matherr.3m \ + modf.3m \ + nan.3m \ + nearbyint.3m \ + nextafter.3m \ + pow.3m \ + remainder.3m \ + remquo.3m \ + rint.3m \ + round.3m \ + scalb.3m \ + scalbln.3m \ + signbit.3m \ + significand.3m \ + sin.3m \ + sincos.3m \ + sinh.3m \ + sqrt.3m \ + tan.3m \ + tanh.3m \ + tgamma.3m \ + trunc.3m \ + y0.3m + +.KEEP_STATE: + +include ../Makefile.man + +install: $(ROOTMANFILES) diff --git a/usr/src/man/man3m/acos.3m b/usr/src/man/man3m/acos.3m new file mode 100644 index 0000000000..7af66e7a98 --- /dev/null +++ b/usr/src/man/man3m/acos.3m @@ -0,0 +1,124 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH acos 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +acos, acosf, acosl \- arc cosine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBacos\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBacosf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBacosl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the principal value of the arc cosine of \fIx\fR. The +value of \fIx\fR should be in the range [\(mi1,1]. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the arc cosine of \fIx\fR in +the range [0, \c +.if n pi\c +.if t \(*p +\c +] radians. +.sp +.LP +For finite values of \fIx\fR not in the range [\(mi1,1], a domain error occurs +and NaN is returned. +.sp +.LP +If \fIx\fR is NaN, NaN is returned. +.sp +.LP +If \fIx\fR is +1, +0 is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, a domain error occurs and NaN is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBacos()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is finite and not in the range [-1,1], or is \(+-Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBacos()\fR function sets \fBerrno\fR to \fBEDOM\fR if \fIx\fR is not +\(+-Inf or NaN and is not in the range [\(mi1,1]. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBacos()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBacosf()\fR +and \fBacosl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcos\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/acosh.3m b/usr/src/man/man3m/acosh.3m new file mode 100644 index 0000000000..dc3c482333 --- /dev/null +++ b/usr/src/man/man3m/acosh.3m @@ -0,0 +1,119 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Copyright (c) 1983 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution. +.\" Portions Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.TH acosh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +acosh, acoshf, acoshl \- inverse hyperbolic cosine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBacosh\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBacoshf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBacoshl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the inverse hyperbolic cosine of their argument +\fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the inverse hyperbolic +cosine of their argument. +.sp +.LP +For finite values of \fIx\fR < 1, a domain error occurs and NaN is returned. +.sp +.LP +If \fIx\fR is NaN, NaN is returned. +.sp +.LP +If \fIx\fR is +1, +0 is returned. +.sp +.LP +If \fIx\fR is +Inf, +Inf is returned. +.sp +.LP +If \fIx\fR is \(miInf, a domain error occurs and NaN is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBacosh()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is finite and less than 1.0, or is \(miInf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBacosh()\fR function sets \fBerrno\fR to \fBEDOM\fR if \fIx\fR is less +than 1.0. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBacosh()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBacoshf()\fR +and \fBacoshl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcosh\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/asin.3m b/usr/src/man/man3m/asin.3m new file mode 100644 index 0000000000..2a71a3feaf --- /dev/null +++ b/usr/src/man/man3m/asin.3m @@ -0,0 +1,128 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH asin 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +asin, asinf, asinl \- arc sine function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBasin\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBasinf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBasinl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the principal value of the arc sine of their argument +\fIx\fR. The value of \fIx\fR should be in the range [\(mi1,1]. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the arc sine of \fIx\fR in +the range [\(mi\c +.if n pi\c +.if t \(*p +\c +/2, \c +.if n pi\c +.if t \(*p +\c +/2] radians. +.sp +.LP +For finite values of \fIx\fR not in the range [\(mi1,1], a domain error occurs +and a NaN is returned. +.sp +.LP +If \fIx\fR is NaN, NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, a domain error occurs and a NaN is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBasin()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is finite and not in the range [\(mi1,1], or is \(+-Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBasin()\fR function sets \fBerrno\fR to \fBEDOM\fR if \fIx\fR is not +\(+-Inf or NaN and is not in the range [\(mi1,1]. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBasin()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBasinf()\fR +and \fBasinl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisnan\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBsin\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/asinh.3m b/usr/src/man/man3m/asinh.3m new file mode 100644 index 0000000000..0e49abaad4 --- /dev/null +++ b/usr/src/man/man3m/asinh.3m @@ -0,0 +1,73 @@ +'\" te +.\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH asinh 3M "1 Sep 2002" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +asinh, asinhf, asinhl \- inverse hyperbolic sine functions +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBasinh\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBasinhf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBasinhl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the inverse hyperbolic sine of their argument \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the inverse hyperbolic sine +of their argument. +.sp +.LP +If \fIx\fR is NaN, NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+-Inf, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBmath.h\fR(3HEAD), \fBsinh\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/atan.3m b/usr/src/man/man3m/atan.3m new file mode 100644 index 0000000000..5fd5a711a3 --- /dev/null +++ b/usr/src/man/man3m/atan.3m @@ -0,0 +1,91 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH atan 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +atan, atanf, atanl \- arc tangent function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBatan\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBatanf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBatanl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the principal value of the arc tangent of \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the arc tangent of \fIx\fR +in the range [\(mi\c +.if n pi\c +.if t \(*p +\c +/2,\c +.if n pi\c +.if t \(*p +\c +/2] radians. +.sp +.LP +If \fIx\fR is NaN, NaN is returned. +.sp +.LP +If x is \(+-0, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, \(+-\c +.if n pi\c +.if t \(*p +\c +/2 is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBatan2\fR(3M), \fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBtan\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/atan2.3m b/usr/src/man/man3m/atan2.3m new file mode 100644 index 0000000000..ece70e3f0c --- /dev/null +++ b/usr/src/man/man3m/atan2.3m @@ -0,0 +1,154 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH atan2 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +atan2, atan2f, atan2l \- arc tangent function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBatan2\fR(\fBdouble\fR \fIy\fR, \fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBatan2f\fR(\fBfloat\fR \fIy\fR, \fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBatan2l\fR(\fBlong double\fR \fIy\fR, \fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the principal value of the arc tangent of \fIy/x\fR, +using the signs of both arguments to determine the quadrant of the return +value. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the arc tangent of +\fIy\fR/\fIx\fR in the range [ \(mi\c +.if n pi\c +.if t \(*p +\c +,\c +.if n pi\c +.if t \(*p +\c + ] radians. +.sp +.LP +If \fIy\fR is \(+-0 and \fIx\fR is < 0, \(+-\c +.if n pi\c +.if t \(*p +\c + is returned. +.sp +.LP +If \fIy\fR is \(+-0 and \fIx\fR is > 0, \(+-0 is returned. +.sp +.LP +If \fIy\fR is < 0 and \fIx\fR is \(+-0, \(mi\c +.if n pi\c +.if t \(*p +\c +/2 is returned. +.sp +.LP +If \fIy\fR is > 0 and \fIx\fR is \(+-0, \c +.if n pi\c +.if t \(*p +\c +/2 is returned. +.sp +.LP +If \fIx\fR is 0, a pole error does not occur. +.sp +.LP +If either \fIx\fR or \fIy\fR is NaN, a NaN is returned. +.sp +.LP +If \fIy\fR is \(+-0 and \fIx\fR is -0, \(+-\c +.if n pi\c +.if t \(*p +\c + is returned. +.sp +.LP +If \fIy\fR is \(+-0 and \fIx\fR is +0, \(+-0 is returned. +.sp +.LP +For finite values of \(+-\fIy\fR > 0, if x is \(miInf, \(+-\c +.if n pi\c +.if t \(*p +\c + is returned. +.sp +.LP +For finite values of \(+-\fIy\fR > 0, if x is +Inf, \(+-0 is returned. +.sp +.LP +For finite values of \fIx\fR, if \fIy\fR is \(+-Inf, \(+-\c +.if n pi\c +.if t \(*p +\c +/2 is returned. +.sp +.LP +If \fIy\fR is \(+-Inf and \fIx\fR is \(miInf, \(+-3\c +.if n pi\c +.if t \(*p +\c +/4 is returned. +.sp +.LP +If \fIy\fR is \(+-Inf and \fIx\fR is +Inf, \(+-\c +.if n pi\c +.if t \(*p +\c +/4 is returned. +.sp +.LP +If both arguments are 0, a domain error does not occur. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBatan\fR(3M), \fBisnan\fR(3M), \fBmath.h\fR(3HEAD)\fBtan\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/atanh.3m b/usr/src/man/man3m/atanh.3m new file mode 100644 index 0000000000..3f5dd486e2 --- /dev/null +++ b/usr/src/man/man3m/atanh.3m @@ -0,0 +1,141 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH atanh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +atanh, atanhf, atanhl \- inverse hyperbolic tangent functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBatanh\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBatanhf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBatanhl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the inverse hyperbolic tangent of their argument +\fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the inverse hyperbolic +tangent of their argument. +.sp +.LP +If \fIx\fR is \(+-1, a pole error occurs and \fBatanh()\fR, \fBatanhf()\fR, and +\fBatanhl()\fR return the value of the macro \fBHUGE_VAL\fR, \fBHUGE_VALF\fR, +and \fBHUGE_VALL\fR, respectively, with the same sign as the correct value of +the function. +.sp +.LP +For finite |\fIx\fR| > 1, a domain error occurs and a NaN is returned. +.sp +.LP +If \fIx\fR is NaN, NaN is returned. +.sp +.LP +If \fIx\fR is +0, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is +Inf, a domain error occurs and a NaN is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBatanh()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is finite and not in the range [-1,1], or is \(+-Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBatanh()\fR function sets \fBerrno\fR to \fBEDOM\fR if the absolute value +of \fIx\fR is greater than 1.0. +.RE + +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is \(+-1. +.sp +If the integer expression (math_errhandling & MATH_ERREXCEPT) is non-zero, then +the divide-by-zero floating-point exception is raised. +.sp +The \fBatanh()\fR function sets \fBerrno\fR to \fBERANGE\fR if the absolute +value of \fIx\fR is equal to 1.0. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBatanh()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBatanhf()\fR +and \fBatanhl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBmath.h\fR(3HEAD), +\fBmatherr\fR(3M), \fBtanh\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/cabs.3m b/usr/src/man/man3m/cabs.3m new file mode 100644 index 0000000000..201f920b5b --- /dev/null +++ b/usr/src/man/man3m/cabs.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cabs 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cabs, cabsf, cabsl \- return a complex absolute value +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble\fR \fBcabs\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBcabsf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBcabsl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex absolute value (also called norm, modulus, +or magnitude) of \fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the complex absolute value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/cacos.3m b/usr/src/man/man3m/cacos.3m new file mode 100644 index 0000000000..a13816d553 --- /dev/null +++ b/usr/src/man/man3m/cacos.3m @@ -0,0 +1,73 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cacos 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cacos, cacosf, cacosl \- complex arc cosine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcacos\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcacosf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcacosl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex arc cosine of \fIz\fR, with branch cuts +outside the interval [ -1, +1 ] along the real axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex arc cosine value, in the range of a strip +mathematically unbounded along the imaginary axis and in the interval [ 0, \c +.if n pi\c +.if t \(*p +\c + ] along the real axis. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBccos\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/cacosh.3m b/usr/src/man/man3m/cacosh.3m new file mode 100644 index 0000000000..b578750e01 --- /dev/null +++ b/usr/src/man/man3m/cacosh.3m @@ -0,0 +1,79 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cacosh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cacosh, cacoshf, cacoshl \- complex arc hyperbolic cosine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcacosh\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcacoshf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcacoshl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex arc hyperbolic cosine of \fIz\fR, with a +branch cut at values less than 1 along the real axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex arc hyperbolic cosine value, in the range of +a half-strip of non-negative values along the real axis and in the interval [ +-\fIi\fR\c +.if n pi\c +.if t \(*p +\c +, +\fIi\fR\c +.if n pi\c +.if t \(*p +\c + ] along the imaginary axis. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBccosh\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/carg.3m b/usr/src/man/man3m/carg.3m new file mode 100644 index 0000000000..b3b3802167 --- /dev/null +++ b/usr/src/man/man3m/carg.3m @@ -0,0 +1,77 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH carg 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +carg, cargf, cargl \- complex argument functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble\fR \fBcarg\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBcargf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBcargl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the argument (also called phase angle) of \fIz\fR, with +a branch cut along the negative real axis. +.SH RETURN VALUES +.sp +.LP +These functions return the value of the argument in the interval [ \(mi\c +.if n pi\c +.if t \(*p +\c +, +\c +.if n pi\c +.if t \(*p +\c + ]. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcimag\fR(3M), \fBcomplex.h\fR(3HEAD), \fBconj\fR(3M), \fBcproj\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/casin.3m b/usr/src/man/man3m/casin.3m new file mode 100644 index 0000000000..b498c898e3 --- /dev/null +++ b/usr/src/man/man3m/casin.3m @@ -0,0 +1,77 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH casin 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +casin, casinf, casinl \- complex arc sine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcasin\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcasinf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcasinl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex arc sine of \fIz\fR, with branch cuts +outside the interval [ \(mi1, +1 ] along the real axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex arc sine value, in the range of a strip +mathematically unbounded along the imaginary axis and in the interval [ \(mi\c +.if n pi\c +.if t \(*p +\c +/2, +\c +.if n pi\c +.if t \(*p +\c +/2 ] along the real axis. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcomplex.h\fR(3HEAD), \fBcsin\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/casinh.3m b/usr/src/man/man3m/casinh.3m new file mode 100644 index 0000000000..7c1f973dcb --- /dev/null +++ b/usr/src/man/man3m/casinh.3m @@ -0,0 +1,79 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH casinh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +casinh, casinhf, casinhl \- complex arc hyperbolic sine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcasinh\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcasinhf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcasinhl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex arc hyperbolic sine of \fIz\fR, with branch +cuts outside the interval [ -\fIi\fR, +\fIi\fR] along the imaginary axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex arc hyperbolic sine value, in the range of a +strip mathematically unbounded along the real axis and in the interval [ +\(mi\fIi\fR\c +.if n pi\c +.if t \(*p +\c +/2, +\fIi\fR\c +.if n pi\c +.if t \(*p +\c +/2 ] along the imaginary axis. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcomplex.h\fR(3HEAD), \fBcsinh\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/catan.3m b/usr/src/man/man3m/catan.3m new file mode 100644 index 0000000000..bf8c5e241e --- /dev/null +++ b/usr/src/man/man3m/catan.3m @@ -0,0 +1,85 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH catan 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +catan, catanf, catanl \- complex arc tangent functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcatan\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcatanf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcatanl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex arc tangent of \fIz\fR, with branch cuts +outside the interval [ \(mi\fIi\fR, +++++\c +.if n pi\c +.if t \(*p +\c +\c +.if n pi\c +.if t \(*p +\c +\fIi\fR ] along the imaginary axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex arc tangent value, in the range of a strip +mathematically unbounded along the imaginary axis and in the interval [ \(mi\c +.if n pi\c +.if t \(*p +\c +/2, +\c +.if n pi\c +.if t \(*p +\c +/2 ] along the real axis. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcomplex.h\fR(3HEAD), \fBctan\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/catanh.3m b/usr/src/man/man3m/catanh.3m new file mode 100644 index 0000000000..465f9e4ed2 --- /dev/null +++ b/usr/src/man/man3m/catanh.3m @@ -0,0 +1,79 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH catanh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +catanh, catanhf, catanhl \- complex arc hyperbolic tangent functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcatanh\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcatanhf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcatanhl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex arc hyperbolic tangent of \fIz\fR, with +branch cuts outside the interval [ \(mi1, +1 ] along the real axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex arc hyperbolic tangent value, in the range +of a strip mathematically unbounded along the real axis and in the interval [ +\(mi\fIi\fR\c +.if n pi\c +.if t \(*p +\c +/2, +\fIi\fR\c +.if n pi\c +.if t \(*p +\c +/2 ] along the imaginary axis. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcomplex.h\fR(3HEAD), \fBctanh\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/cbrt.3m b/usr/src/man/man3m/cbrt.3m new file mode 100644 index 0000000000..2798da8e2d --- /dev/null +++ b/usr/src/man/man3m/cbrt.3m @@ -0,0 +1,74 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cbrt 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cbrt, cbrtf, cbrtl \- cube root functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBcbrt\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBcbrtf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBcbrtl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the real cube root of their argument \fIx\fR. +.SH RETURN VALUES +.sp +.LP +On successful completion, these functions return the cube root of \fIx\fR. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+-Inf, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/ccos.3m b/usr/src/man/man3m/ccos.3m new file mode 100644 index 0000000000..d142b57ada --- /dev/null +++ b/usr/src/man/man3m/ccos.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH ccos 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +ccos, ccosf, ccosl \- complex cosine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBccos\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBccosf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBccosl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex cosine of \fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the complex cosine value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcacos\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/ccosh.3m b/usr/src/man/man3m/ccosh.3m new file mode 100644 index 0000000000..d470a6b07a --- /dev/null +++ b/usr/src/man/man3m/ccosh.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH ccosh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +ccosh, ccoshf, ccoshl \- complex hyperbolic cosine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBccosh\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBccoshf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBccoshl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex hyperbolic cosine of \fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the complex hyperbolic cosine value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcacosh\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/ceil.3m b/usr/src/man/man3m/ceil.3m new file mode 100644 index 0000000000..7e4d2586e1 --- /dev/null +++ b/usr/src/man/man3m/ceil.3m @@ -0,0 +1,79 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH ceil 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +ceil, ceilf, ceill \- ceiling value function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBceil\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBceilf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBceill\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the smallest integral value not less than \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, the \fBceil()\fR, \fBceilf()\fR, and \fBceill()\fR +functions return the smallest integral value not less than \fIx\fR, expressed +as a type \fBdouble\fR, \fBfloat\fR, or \fBlong double\fR, respectively. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+-Inf, \fIx\fR is returned. +.SH USAGE +.sp +.LP +The integral value returned by these functions need not be expressible as an +\fBint\fR or \fBlong int\fR. The return value should be tested before assigning +it to an integer type to avoid the undefined results of an integer overflow. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBfloor\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/cexp.3m b/usr/src/man/man3m/cexp.3m new file mode 100644 index 0000000000..140f8b3658 --- /dev/null +++ b/usr/src/man/man3m/cexp.3m @@ -0,0 +1,67 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cexp 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cexp, cexpf, cexpl \- complex exponential functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcexp\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcexpf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcexpl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex exponent of \fIz\fR, defined as e^\fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the complex exponential value of \fIz\fR. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBclog\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/cimag.3m b/usr/src/man/man3m/cimag.3m new file mode 100644 index 0000000000..16e776c944 --- /dev/null +++ b/usr/src/man/man3m/cimag.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cimag 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cimag, cimagf, cimagl \- complex imaginary functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble\fR \fBcimag\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBcimagf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBcimagl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the imaginary part of \fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the imaginary part value (as a real). +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcarg\fR(3M), \fBcomplex.h\fR(3HEAD), \fBconj\fR(3M), \fBcproj\fR(3M), +\fBcreal\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/clog.3m b/usr/src/man/man3m/clog.3m new file mode 100644 index 0000000000..f11cc044a5 --- /dev/null +++ b/usr/src/man/man3m/clog.3m @@ -0,0 +1,70 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH clog 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +clog, clogf, clogl \- complex natural logarithm functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBclog\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBclogf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBclogl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex natural (base \fIe\fR) logarithm of +\fIz\fR, with a branch cut along the negative real axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex natural logarithm value, in the range of a +strip mathematically unbounded along the real axis and in the interval [ +-\fIi\fR , +\fIi\fR ] along the imaginary axis. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcexp\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/conj.3m b/usr/src/man/man3m/conj.3m new file mode 100644 index 0000000000..c02288bf63 --- /dev/null +++ b/usr/src/man/man3m/conj.3m @@ -0,0 +1,69 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH conj 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +conj, conjf, conjl \- complex conjugate functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBconj\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBconjf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBconjl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex conjugate of z, by reversing the sign of +its imaginary part. +.SH RETURN VALUES +.sp +.LP +These functions return the complex conjugate value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcarg\fR(3M), \fBcimag\fR(3M), \fBcomplex.h\fR(3HEAD), \fBcproj\fR(3M), +\fBcreal\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/copysign.3m b/usr/src/man/man3m/copysign.3m new file mode 100644 index 0000000000..017b9f9088 --- /dev/null +++ b/usr/src/man/man3m/copysign.3m @@ -0,0 +1,70 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH copysign 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +copysign, copysignf, copysignl \- number manipulation function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBcopysign\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBcopysignf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBcopysignl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions produce a value with the magnitude of \fIx\fR and the sign of +\fIy\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return a value with the magnitude +of \fIx\fR and the sign of \fIy\fR. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBmath.h\fR(3HEAD), \fBsignbit\fR(3M),\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/cos.3m b/usr/src/man/man3m/cos.3m new file mode 100644 index 0000000000..023f211d14 --- /dev/null +++ b/usr/src/man/man3m/cos.3m @@ -0,0 +1,102 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cos 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cos, cosf, cosl \- cosine function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBcos\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBcosf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBcosl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the cosine of \fIx\fR, measured in radians. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the cosine of \fIx\fR. +.sp +.LP +If \fIx\fR is NaN, NaN is returned. +.sp +.LP +If \fIx\fR is +0, 1.0 is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, a domain error occurs and a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is \(+-Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBacos\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBsin\fR(3M), \fBtan\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/cosh.3m b/usr/src/man/man3m/cosh.3m new file mode 100644 index 0000000000..5144e1b959 --- /dev/null +++ b/usr/src/man/man3m/cosh.3m @@ -0,0 +1,120 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cosh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cosh, coshf, coshl \- hyperbolic cosine function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBcosh\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBcoshf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBcoshl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the hyperbolic cosine of their argument \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the hyperbolic cosine of +\fIx\fR. +.sp +.LP +If the correct value would cause overflow, a range error occurs and +\fBcosh()\fR, \fBcoshf()\fR, and \fBcoshl()\fR return the value of the macro +\fBHUGE_VAL\fR, \fBHUGE_VALF\fR, and \fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, 1.0 is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, \(+-Inf is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBcosh()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result would cause an overflow. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception is raised. +.sp +The \fBcosh()\fR function sets \fBerrno\fR to \fBERANGE\fR if the result would +cause an overflow. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBcosh()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBcoshf()\fR +and \fBcoshl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBacosh\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBsinh\fR(3M), +\fBtanh\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/cpow.3m b/usr/src/man/man3m/cpow.3m new file mode 100644 index 0000000000..cb6fca6081 --- /dev/null +++ b/usr/src/man/man3m/cpow.3m @@ -0,0 +1,70 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cpow 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cpow, cpowf, cpowl \- complex power functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcpow\fR(\fBdouble complex\fR \fIx\fR, \fBdouble complex\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcpowf\fR(\fBfloat complex\fR \fIx\fR, \fBfloat complex\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcpowl\fR(\fBlong double complex\fR \fIx\fR, + \fBlong double complex\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex power function \fIx\fR^\fIy\fR, with a +branch cut for the first parameter along the negative real axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex power function value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcabs\fR(3M), \fBcomplex.h\fR(3HEAD), \fBcsqrt\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/cproj.3m b/usr/src/man/man3m/cproj.3m new file mode 100644 index 0000000000..c471752d3e --- /dev/null +++ b/usr/src/man/man3m/cproj.3m @@ -0,0 +1,79 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH cproj 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +cproj, cprojf, cprojl \- complex projection functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcproj\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcprojf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcprojl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute a projection of \fIz\fR onto the Riemann sphere: +\fIz\fR projects to \fIz\fR, except that all complex infinities (even those +with one infinite part and one NaN part) project to positive infinity on the +real axis. If \fIz\fR has an infinite part, then \fBcproj\fR(\fIz\fR) is +equivalent to: +.sp +.in +2 +.nf +INFINITY + I * copysign(0.0, cimag(z)) +.fi +.in -2 + +.SH RETURN VALUES +.sp +.LP +These functions return the value of the projection onto the Riemann sphere. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcarg\fR(3M), \fBcimag\fR(3M), \fBcomplex.h\fR(3HEAD), \fBconj\fR(3M), +\fBcreal\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/creal.3m b/usr/src/man/man3m/creal.3m new file mode 100644 index 0000000000..f3e6c90c99 --- /dev/null +++ b/usr/src/man/man3m/creal.3m @@ -0,0 +1,79 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH creal 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +creal, crealf, creall \- complex real functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble\fR \fBcreal\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBcrealf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBcreall\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the real part of z. +.SH RETURN VALUES +.sp +.LP +These functions return the real part value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +For a variable \fIz\fR of complex type: +.sp +.in +2 +.nf +z == creal(z) + cimag(z)*I +.fi +.in -2 + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcarg\fR(3M), \fBcimag\fR(3M), \fBcomplex.h\fR(3HEAD), \fBconj\fR(3M), +\fBcproj\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/csin.3m b/usr/src/man/man3m/csin.3m new file mode 100644 index 0000000000..33f79c7a51 --- /dev/null +++ b/usr/src/man/man3m/csin.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH csin 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +csin, csinf, csinl \- complex sine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcsin\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcsinf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcsinl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex sine of \fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the complex sine value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcasin\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/csinh.3m b/usr/src/man/man3m/csinh.3m new file mode 100644 index 0000000000..16a5e7db7c --- /dev/null +++ b/usr/src/man/man3m/csinh.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH csinh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +csinh, csinhf, csinhl \- complex hyperbolic sine functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcsinh\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcsinhf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcsinhl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex hyperbolic sine of \fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the complex hyperbolic sine value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcasinh\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/csqrt.3m b/usr/src/man/man3m/csqrt.3m new file mode 100644 index 0000000000..1038b7c580 --- /dev/null +++ b/usr/src/man/man3m/csqrt.3m @@ -0,0 +1,70 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH csqrt 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +csqrt, csqrtf, csqrtl \- complex square root functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBcsqrt\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBcsqrtf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBcsqrtl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex square root of \fIz\fR, with a branch cut +along the negative real axis. +.SH RETURN VALUES +.sp +.LP +These functions return the complex square root value, in the range of the right +half-plane (including the imaginary axis). +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcabs\fR(3M), \fBcomplex.h\fR(3HEAD), \fBcpow\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/ctan.3m b/usr/src/man/man3m/ctan.3m new file mode 100644 index 0000000000..b3b2901bc1 --- /dev/null +++ b/usr/src/man/man3m/ctan.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH ctan 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +ctan, ctanf, ctanl \- complex tangent functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBctan\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBctanf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBctanl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex tangent of \fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the complex tangent value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcatan\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/ctanh.3m b/usr/src/man/man3m/ctanh.3m new file mode 100644 index 0000000000..0d3490ad3d --- /dev/null +++ b/usr/src/man/man3m/ctanh.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH ctanh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +ctanh, ctanhf, ctanhl \- complex hyperbolic tangent functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <complex.h> + +\fBdouble complex\fR \fBctanh\fR(\fBdouble complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat complex\fR \fBctanhf\fR(\fBfloat complex\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double complex\fR \fBctanhl\fR(\fBlong double complex\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the complex hyperbolic tangent of \fIz\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the complex hyperbolic tangent value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcatanh\fR(3M), \fBcomplex.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/erf.3m b/usr/src/man/man3m/erf.3m new file mode 100644 index 0000000000..d30fdd89e3 --- /dev/null +++ b/usr/src/man/man3m/erf.3m @@ -0,0 +1,88 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical +.\" and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. +.\" All Rights Reserved. +.\" Copyright (c) 1983 Regents of the University +.\" of California. All rights reserved. The Berkeley software License Agreement +.\" specifies the terms and conditions for redistribution. +.\" Portions Copyright (c) 2006, Sun Microsystems, +.\" Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.TH erf 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +erf, erff, erfl \- error function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBerf\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBerff\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBerfl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the error function of their argument \fIx\fR, defined +as: +.sp +2/sqrt(pi)*intregral from 0 to x of exp(-t*t) dt +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the value of the error +function. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, \(+-0 is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, \(+-1 is returned. +.sp +.LP +If \fIx\fR is subnormal, 2/sqrt(\c +.if n pi\c +.if t \(*p +\c +) * 2 is returned. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBerfc\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/erfc.3m b/usr/src/man/man3m/erfc.3m new file mode 100644 index 0000000000..4f451278d2 --- /dev/null +++ b/usr/src/man/man3m/erfc.3m @@ -0,0 +1,88 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH erfc 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +erfc, erfcf, erfcl \- complementary error function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBerfc\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBerfcf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBerfcl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These function compute the complementary error function 1.0 \(mi +\fBerf(\fR\fIx\fR\fB).\fR +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the value of the +complementary error function. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, +1 is returned. +.sp +.LP +If \fIx\fR is \(miInf, +2 is returned. +.sp +.LP +If \fIx\fR is +Inf, 0 is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +The \fBerfc()\fR function is provided because of the extreme loss of relative +accuracy if \fBerf(\fR\fIx\fR\fB)\fR is called for large \fIx\fR and the result +subtracted from 1.0. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBerf\fR(3M), \fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/exp.3m b/usr/src/man/man3m/exp.3m new file mode 100644 index 0000000000..d751dda290 --- /dev/null +++ b/usr/src/man/man3m/exp.3m @@ -0,0 +1,120 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH exp 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +exp, expf, expl \- exponential function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBexp\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBexpf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBexpl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the base-\fIe\fR exponential of \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the exponential value of +\fIx\fR. +.sp +.LP +If the correct value would cause overflow, a range error occurs and +\fBexp()\fR, \fBexpf()\fR, and \fBexpl()\fR return \fBHUGE_VAL\fR, +\fBHUGE_VALF\fR, and \fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, 1 is returned. +.sp +.LP +If \fIx\fR is +Inf, \fIx\fR is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBexp()\fR as specified by SVID3 and XPG3. See \fBstandards\fR(5). +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception is raised. +.sp +The \fBexp()\fR function sets \fBerrno\fR to \fBERANGE\fR if the result +overflows. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBexp()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBexpf()\fR and +\fBexpl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBisnan\fR(3M), +\fBlog\fR(3M), \fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBmp\fR(3MP), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/exp2.3m b/usr/src/man/man3m/exp2.3m new file mode 100644 index 0000000000..1eb9f59a4f --- /dev/null +++ b/usr/src/man/man3m/exp2.3m @@ -0,0 +1,109 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH exp2 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +exp2, exp2f, exp2l \- exponential base 2 functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBexp2\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBexp2f\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBexp2l\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the base-2 exponential of \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return 2^\fIx\fR. +.sp +.LP +If the correct value would cause overflow, a range error occurs and +\fBexp2()\fR, \fBexp2f()\fR, and \fBexp2l()\fR return the value of the macro +\fBHUGE_VAL\fR, \fBHUGE_VALF\fR, and \fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, 1 is returned. +.sp +.LP +If \fIx\fR is \(miInf, +0 is returned. +.sp +.LP +If \fIx\fR is +Inf, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception will be raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBexp\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBlog\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/expm1.3m b/usr/src/man/man3m/expm1.3m new file mode 100644 index 0000000000..c68701f110 --- /dev/null +++ b/usr/src/man/man3m/expm1.3m @@ -0,0 +1,125 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH expm1 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +expm1, expm1f, expm1l \- compute exponential function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBexpm1\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBexpm1f\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBexpm1l\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute \fIe\fR^\fIx\fR\(mi1.0. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return \fIe\fR^\fIx\fR\(mi1.0. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, \(+-0 is returned. +.sp +.LP +If \fIx\fR is \(miInf, \(mi1 is returned. +.sp +.LP +If \fIx\fR is +Inf, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +The value of \fBexpm1(\fR\fIx\fR\fB)\fR can be more accurate than +\fBexp(\fIx\fR)\fR\(mi1.0 for small values of \fIx\fR. +.sp +.LP +The \fBexpm1()\fR and \fBlog1p\fR(3M) functions are useful for financial +calculations of ((1+\fIx\fR)^\fIn\fR\(mi1)/\fIx\fR, namely: +.sp +.in +2 +.nf +\fBexpm1(\fIn\fR * log1p(\fIx\fR))\|/\|\fR\fIx\fR +.fi +.in -2 + +.sp +.LP +when \fIx\fR is very small (for example, when performing calculations with a +small daily interest rate). These functions also simplify writing accurate +inverse hyperbolic functions. +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBexp\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBilogb\fR(3M), \fBlog1p\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/fabs.3m b/usr/src/man/man3m/fabs.3m new file mode 100644 index 0000000000..79de9d06f8 --- /dev/null +++ b/usr/src/man/man3m/fabs.3m @@ -0,0 +1,78 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fabs 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fabs, fabsf, fabsl \- absolute value function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBfabs\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBfabsf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBfabsl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the absolute value of \fIx\fR, |\fIx\fR|. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the absolute value of +\fIx\fR. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, +0 is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, +Inf is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/fdim.3m b/usr/src/man/man3m/fdim.3m new file mode 100644 index 0000000000..c2fd56b999 --- /dev/null +++ b/usr/src/man/man3m/fdim.3m @@ -0,0 +1,103 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fdim 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fdim, fdimf, fdiml \- compute positive difference between two floating-point +numbers +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBfdim\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBfdimf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBfdiml\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions determine the positive difference between their arguments. If +\fIx\fR is greater than \fIy\fR, \fIx\fR\(mi\fIy\fR is returned. If \fIx\fR is +less than or equal to \fIy\fR, +0 is returned. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the positive difference +value. +.sp +.LP +If \fIx\fR\(mi\fIy\fR is positive and overflows, a range error occurs and +\fBfdim()\fR, \fBfdimf()\fR, and \fBfdiml()\fR returns the value of the macro +\fBHUGE_VAL\fR, \fBHUGE_VALF\fR, and \fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception will be raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBfmax\fR(3M), +\fBfmin\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/feclearexcept.3m b/usr/src/man/man3m/feclearexcept.3m new file mode 100644 index 0000000000..542bc4213b --- /dev/null +++ b/usr/src/man/man3m/feclearexcept.3m @@ -0,0 +1,62 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH feclearexcept 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +feclearexcept \- clear floating-point exception +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfeclearexcept\fR(\fBint\fR \fIexcepts\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfeclearexcept()\fR function attempts to clear the supported +floating-point exceptions represented by \fIexcepts\fR. +.SH RETURN VALUES +.sp +.LP +If \fIexcepts\fR is 0 or if all the specified exceptions were successfully +cleared, \fBfeclearexcept()\fR returns 0. Otherwise, it returns a non-zero +value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfenv.h\fR(3HEAD), \fBfegetexceptflag\fR(3M), \fBferaiseexcept\fR(3M), +\fBfesetexceptflag\fR(3M), \fBfetestexcept\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/fegetenv.3m b/usr/src/man/man3m/fegetenv.3m new file mode 100644 index 0000000000..69739db5a1 --- /dev/null +++ b/usr/src/man/man3m/fegetenv.3m @@ -0,0 +1,97 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fegetenv 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fegetenv, fesetenv \- get and set current floating-point environment +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfegetenv\fR(\fBfenv_t *\fR\fIenvp\fR); +.fi + +.LP +.nf +\fBint\fR \fBfesetenv\fR(\fBconst fenv_t *\fR\fIenvp\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfegetenv()\fR function attempts to store the current floating-point +environment in the object pointed to by \fIenvp\fR. +.sp +.LP +The \fBfesetenv()\fR function attempts to establish the floating-point +environment represented by the object pointed to by \fIenvp\fR. The \fIenvp\fR +argument points to an object set by a call to \fBfegetenv()\fR or +\fBfeholdexcept\fR(3M), or equals a floating-point environment macro. The +\fBfesetenv()\fR function does not raise floating-point exceptions, but only +installs the state of the floating-point status flags represented through its +argument. +.SH RETURN VALUES +.sp +.LP +If the representation was successfully stored, fegetenv returns 0. Otherwise, +it returns a non-zero value. +.sp +.LP +If the environment was successfully established, fesetenv returns 0. Otherwise, +it returns a non-zero value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeholdexcept\fR(3M), \fBfenv.h\fR(3HEAD), \fBfeupdateenv\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) +.SH NOTES +.sp +.LP +In a multithreaded program, the \fBfegetenv()\fR and \fBfegetenv()\fR functions +affect the floating point environment only for the calling thread. +.sp +.LP +These functions automatically install and deinstall \fBSIGFPE\fR handlers and +set and clear the trap enable mode bits in the floating point status register +as needed. If a program uses these functions and attempts to install a +\fBSIGFPE\fR handler or control the trap enable mode bits independently, the +resulting behavior is not defined. +.sp +.LP +As described in \fBfex_set_handling\fR(3M)\fB\fR, when a handling function +installed in \fBFEX_CUSTOM\fR mode is invoked, all exception traps are disabled +(and will not be reenabled while \fBSIGFPE\fR is blocked). Thus, attempting to +change the environment from within a handler by calling \fBfesetenv\fR or +\fBfeupdateenv\fR(3M) might not produce the expected results. diff --git a/usr/src/man/man3m/fegetexceptflag.3m b/usr/src/man/man3m/fegetexceptflag.3m new file mode 100644 index 0000000000..67539dd0c1 --- /dev/null +++ b/usr/src/man/man3m/fegetexceptflag.3m @@ -0,0 +1,80 @@ +'\" te +.\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fegetexceptflag 3M "1 Sep 2002" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fegetexceptflag, fesetexceptflag \- get and set floating-point status flags +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfegetexceptflag\fR(\fBfexcept_t *\fR\fIflagp\fR, \fBint\fR \fIexcepts\fR); +.fi + +.LP +.nf +\fBint\fR \fBfesetexceptflag\fR(\fBconst fexcept_t *\fR\fIflagp\fR, \fBint\fR \fIexcepts\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfegetexceptflag()\fR function attempts to store an +implementation-defined representation of the states of the floating-point +status flags indicated by the \fIexcepts\fR argument in the object pointed to +by the \fIflagp\fR argument. +.sp +.LP +The \fBfesetexceptflag()\fR function attempts to set the floating-point status +flags indicated by the \fIexcepts\fR argument to the states stored in the +object pointed to by \fIflagp\fR. The value pointed to by \fIflagp\fR will have +been set by a previous call to \fBfegetexceptflag()\fR whose second argument +represented at least those floating-point exceptions represented by the +\fIexcepts\fR argument. This function does not raise floating-point exceptions +but only sets the state of the flags. +.SH RETURN VALUES +.sp +.LP +If the representation was successfully stored, \fBfegetexceptflag()\fR returns +0. Otherwise, it returns a non-zero value. +.sp +.LP +If the excepts argument is 0 or if all the specified exceptions were +successfully set, \fBfesetexceptflag()\fR returns 0. Otherwise, it returns a +non-zero value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfenv.h\fR(3HEAD), \fBfeclearexcept\fR(3M), \fBferaiseexcept\fR(3M), +\fBfesetexceptflag\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/fegetround.3m b/usr/src/man/man3m/fegetround.3m new file mode 100644 index 0000000000..cebfd292a5 --- /dev/null +++ b/usr/src/man/man3m/fegetround.3m @@ -0,0 +1,101 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fegetround 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fegetround, fesetround \- get and set current rounding direction +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfegetround\fR(\fBvoid\fR); +.fi + +.LP +.nf +\fBint\fR \fBfesetround\fR(\fBint\fR \fIround\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The fegetround function gets the current rounding direction. +.sp +.LP +The fesetround function establishes the rounding direction represented by its +argument round. If the argument is not equal to the value of a rounding +direction macro, the rounding direction is not changed. +.SH RETURN VALUES +.sp +.LP +The fegetround function returns the value of the rounding direction macro +representing the current rounding direction, or a negative value if there is no +such rounding direction macro or the current rounding direction is not +determinable. +.sp +.LP +The fesetround function returns a 0 value if and only if the requested rounding +direction was established. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH EXAMPLES +.sp +.LP +The following example saves, sets, and restores the rounding direction, +reporting an error and aborting if setting the rounding direction fails: +.LP +\fBExample 1 \fRSave, set, and restore the rounding direction. +.sp +.in +2 +.nf +#include <fenv.h> +#include <assert.h> +void f(int round_dir) +{ + #pragma STDC FENV_ACCESS ON + int save_round; + int setround_ok; + save_round = fegetround(); + setround_ok = fesetround(round_dir); + assert(setround_ok == 0); + /* ... */ + fesetround(save_round); + /* ... */ +} +.fi +.in -2 + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfenv.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/feholdexcept.3m b/usr/src/man/man3m/feholdexcept.3m new file mode 100644 index 0000000000..6da946efc9 --- /dev/null +++ b/usr/src/man/man3m/feholdexcept.3m @@ -0,0 +1,74 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH feholdexcept 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +feholdexcept \- save current floating-point environment +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfeholdexcept\fR(\fBfenv_t *\fR\fIenvp\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfeholdexcept()\fR function saves the current floating-point environment +in the object pointed to by \fIenvp\fR, clears the floating-point status flags, +and then installs a non-stop (continue on floating-point exceptions) mode, if +available, for all floating-point exceptions. +.SH RETURN VALUES +.sp +.LP +The \fBfeholdexcept()\fR function returns 0 if and only if non-stop +floating-point exception handling was successfully installed. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfegetenv\fR(3M), \fBfenv.h\fR(3HEAD), \fBfeupdateenv\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) +.SH NOTES +.sp +.LP +In a multithreaded program, the \fBfeholdexcept()\fR function affects the +floating point environment only for the calling thread. +.sp +.LP +The \fBfeholdexcept()\fR function automatically installs and deinstalls +\fBSIGFPE\fR handlers and sets and clears the trap enable mode bits in the +floating point status register as needed. If a program uses these functions and +attempts to install a \fBSIGFPE\fR handler or control the trap enable mode bits +independently, the resulting behavior is not defined. diff --git a/usr/src/man/man3m/feraiseexcept.3m b/usr/src/man/man3m/feraiseexcept.3m new file mode 100644 index 0000000000..faa4c22a24 --- /dev/null +++ b/usr/src/man/man3m/feraiseexcept.3m @@ -0,0 +1,68 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH feraiseexcept 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +feraiseexcept \- raise floating-point exception +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBferaiseexcept\fR(\fBint\fR \fIexcepts\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBferaiseexcept()\fR function attempts to raise the supported +floating-point exceptions represented by the \fIexcepts\fR argument. The order +in which these floating-point exceptions are raised is unspecified. +.SH RETURN VALUES +.sp +.LP +If \fIexcepts\fR is 0 or if all the specified exceptions were successfully +raised, \fBferaiseexcept()\fR returns 0. Otherwise, it returns a non-zero +value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +The effect is intended to be similar to that of floating-point exceptions +raised by arithmetic operations. Hence, enabled traps for floating-point +exceptions raised by this function are taken. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfegetexceptflag\fR(3M), \fBfenv.h\fR(3HEAD), +\fBfetestexcept\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/fesetprec.3m b/usr/src/man/man3m/fesetprec.3m new file mode 100644 index 0000000000..41d61fb211 --- /dev/null +++ b/usr/src/man/man3m/fesetprec.3m @@ -0,0 +1,110 @@ +'\" te +.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fesetprec 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fesetprec, fegetprec \- control floating point rounding precision modes +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... -lm [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfesetprec\fR(\fBint\fR \fIprec\fR); +.fi + +.LP +.nf +\fBint\fR \fBfegetprec\fR(\fBvoid\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The IEEE 754 standard defines rounding precision modes for systems that always +deliver intermediate results to destinations in extended double precision +format. These modes allow such systems to deliver correctly rounded single and +double precision results (in the absence of underflow and overflow) with only +one rounding. +.sp +.LP +The \fBfesetprec()\fR function sets the current rounding precision to the +precision specified by \fIprec\fR, which must be one of the following values +defined in <\fBfenv.h\fR>: +.sp +.ne 2 +.mk +.na +\fB\fBFE_FLTPREC\fR\fR +.ad +.RS 15n +.rt +round to single precision +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFE_DBLPREC\fR\fR +.ad +.RS 15n +.rt +round to double precision +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFE_LDBLPREC\fR\fR +.ad +.RS 15n +.rt +round to extended double precision +.RE + +.sp +.LP +The default rounding precision when a program starts is \fBFE_LDBLPREC\fR. +.sp +.LP +The \fBfegetprec()\fR function returns the current rounding precision. +.SH RETURN VALUES +.sp +.LP +The \fBfesetprec()\fR function returns a non-zero value if the requested +rounding precision is established and 0 otherwise. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +lw(2.75i) lw(2.75i) +lw(2.75i) lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +ArchitectureIntel (see below) +AvailabilitySUNWlibms +Interface StabilityStable +MT-LevelMT-Safe +.TE + +.sp +.LP +These functions are not available on SPARC systems because SPARC processors +deliver intermediate results to destinations in single or double format as +determined by each floating point instruction. +.SH SEE ALSO +.sp +.LP +\fBfegetenv\fR(3M), \fBfesetround\fR(3M), \fBattributes\fR(5) +.sp +.LP +\fINumerical\fR \fIComputation\fR \fIGuide\fR diff --git a/usr/src/man/man3m/fetestexcept.3m b/usr/src/man/man3m/fetestexcept.3m new file mode 100644 index 0000000000..ada49b7fb1 --- /dev/null +++ b/usr/src/man/man3m/fetestexcept.3m @@ -0,0 +1,88 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fetestexcept 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fetestexcept \- test floating-point exception flags +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfetestexcept\fR(\fBint\fR \fIexcepts\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfetestexcept()\fR function determines which of a specified subset of the +floating-point exception flags are currently set. The \fIexcepts\fR argument +specifies the floating-point status flags to be queried. +.SH RETURN VALUES +.sp +.LP +The \fBfetestexcept()\fR function returns the value of the bitwise-inclusive OR +of the floating-point exception macros corresponding to the currently set +floating-point exceptions included in \fIexcepts\fR. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH EXAMPLES +.LP +\fBExample 1 \fRExample using \fBfetestexcept()\fR +.sp +.LP +The following example calls function \fIf\fR( ) if an invalid exception is set, +and then function \fIg\fR( ) if an overflow exception is set: + +.sp +.in +2 +.nf +#include <fenv.h> +/* ... */ +{ +# pragma STDC FENV_ACCESS ON + int set_excepts; + feclearexcept(FE_INVALID | FE_OVERFLOW); + // maybe raise exceptions + set_excepts = fetestexcept(FE_INVALID | FE_OVERFLOW); + if (set_excepts & FE_INVALID) f(); + if (set_excepts & FE_OVERFLOW) g(); + /* ... */ +} +.fi +.in -2 + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfegetexceptflag\fR(3M), \fBfenv.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/feupdateenv.3m b/usr/src/man/man3m/feupdateenv.3m new file mode 100644 index 0000000000..4fec2126e8 --- /dev/null +++ b/usr/src/man/man3m/feupdateenv.3m @@ -0,0 +1,116 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH feupdateenv 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +feupdateenv \- update floating-point environment +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfeupdateenv\fR(\fBconst fenv_t *\fR\fIenvp\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfeupdateenv()\fR function attempts to save the currently raised +floating-point exceptions in its automatic storage, attempts to install the +floating-point environment represented by the object pointed to by \fIenvp\fR, +and then attempts to raise the saved floating-point exceptions. The \fIenvp\fR +argument points to an object set by a call to \fBfegetenv\fR(3M) or +\fBfeholdexcept\fR(3M), or equals a floating-point environment macro. +.SH RETURN VALUES +.sp +.LP +The \fBfeupdateenv()\fR function returns 0 if and only if all the required +actions were successfully carried out. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH EXAMPLES +.sp +.LP +The following example demonstrates sample code to hide spurious underflow +floating-point exceptions: +.LP +\fBExample 1 \fRHide spurious underflow floating-point exceptions. +.sp +.in +2 +.nf +#include <fenv.h> +double f(double x) +{ +# pragma STDC FENV_ACCESS ON + double result; + fenv_t save_env; + feholdexcept(&save_env); + // compute result + if (/* test spurious underflow */) + feclearexcept(FE_UNDERFLOW); + feupdateenv(&save_env); + return result; +} +.fi +.in -2 + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfegetenv\fR(3M), \fBfeholdexcept\fR(3M), \fBfenv.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) +.SH NOTES +.sp +.LP +In a multithreaded program, the \fBfeupdateenv()\fR function affects the +floating point environment only for the calling thread. +.sp +.LP +When the \fBFEX_CUSTOM\fR handling mode is in effect for an exception, raising +that exception using \fBfeupdateenv()\fR causes the handling function to be +invoked. The handling function can then modify the exception flags to be set as +described in \fBfex_set_handling\fR(3M). Any result value the handler supplies +will be ignored. +.sp +.LP +The \fBfeupdateenv()\fR function automatically installs and deinstalls +\fBSIGFPE\fR handlers and sets and clears the trap enable mode bits in the +floating point status register as needed. If a program uses these functions and +attempts to install a \fBSIGFPE\fR handler or control the trap enable mode bits +independently, the resulting behavior is not defined. +.sp +.LP +As described in \fBfex_set_handling\fR(3M), when a handling function installed +in \fBFEX_CUSTOM\fR mode is invoked, all exception traps are disabled (and will +not be reenabled while \fBSIGFPE\fR is blocked). Thus, attempting to change the +environment from within a handler by calling \fBfesetenv\fR(3M) or +\fBfeupdateenv\fR might not produce the expected results. diff --git a/usr/src/man/man3m/fex_merge_flags.3m b/usr/src/man/man3m/fex_merge_flags.3m new file mode 100644 index 0000000000..607b0cccdc --- /dev/null +++ b/usr/src/man/man3m/fex_merge_flags.3m @@ -0,0 +1,69 @@ +'\" te +.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fex_merge_flags 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fex_merge_flags \- manage the floating point environment +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... -lm [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBvoid\fR \fBfex_merge_flags\fR(\fBconst fenv_t *\fR\fIenvp\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfex_merge_flags()\fR function copies into the current environment those +exception flags that are set in the environment represented by the object +pointed to by \fIenvp\fR. The argument \fIenvp\fR must point to an object set +by a call to \fBfeholdexcept\fR(3M) or \fBfegetenv\fR(3M) or equal to the macro +\fBFE_DFL_ENV\fR. The \fBfex_merge_flags()\fR function does not raise any +exceptions, but only sets its flags. +.SH RETURN VALUES +.sp +.LP +The \fBfex_merge_flags\fR function does not return a value. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +lw(2.75i) lw(2.75i) +lw(2.75i) lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +AvailabilitySUNWlibms, SUNWlmsx +Interface StabilityStable +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfegetenv\fR(3M), \fBfesetround\fR(3M), +\fBfesetprec\fR(3M), \fBfex_set_handling\fR(3M), \fBfex_set_log\fR(3M), +\fBattributes\fR(5) +.sp +.LP +\fINumerical Computation Guide\fR +.SH NOTES +.sp +.LP +In a multithreaded program, the \fBfex_merge_flags()\fR function affects the +floating point environment only for the calling thread. +.sp +.LP +The \fBfex_merge_flags()\fR function automatically installs and deinstalls +\fBSIGFPE\fR handlers and sets and clears the trap enable mode bits in the +floating point status register as needed. If a program uses these functions +and attempts to install a \fBSIGFPE\fR handler or control the trap enable mode +bits independently, the resulting behavior is not defined. diff --git a/usr/src/man/man3m/fex_set_handling.3m b/usr/src/man/man3m/fex_set_handling.3m new file mode 100644 index 0000000000..72d6d06ceb --- /dev/null +++ b/usr/src/man/man3m/fex_set_handling.3m @@ -0,0 +1,473 @@ +'\" te +.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fex_set_handling 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fex_set_handling, fex_get_handling, fex_getexcepthandler, fex_setexcepthandler +\- control floating point exception handling modes +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... -lm [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfex_set_handling\fR(\fBint\fR \fIex\fR, \fBint\fR \fImode\fR, \fBvoid(*\fR\fIhandler\fR); +.fi + +.LP +.nf +\fBint\fR \fBfex_get_handling\fR(\fBint\fR \fIex\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBfex_getexcepthandler\fR(\fBfex_handler_t *\fR\fIbuf\fR, \fBint\fR \fIex\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBfex_setexcepthandler\fR(\fBconst fex_handler_t *\fR\fIbuf\fR, \fBint\fR \fIex\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions provide control of floating point exception handling modes. For +each function, the \fIex\fR argument specifies one or more exceptions indicated +by a bitwise-OR of any of the following values defined in <\fBfenv.h\fR>: +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INEXACT\fR\fR +.ad +.RS 17n +.rt + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_UNDERFLOW\fR\fR +.ad +.RS 17n +.rt + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_OVERFLOW\fR\fR +.ad +.RS 17n +.rt + +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_DIVBYZERO\fR\fR +.ad +.RS 17n +.rt +division by zero +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INV_ZDZ\fR\fR +.ad +.RS 17n +.rt +0/0 invalid operation +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INV_IDI\fR\fR +.ad +.RS 17n +.rt +infinity/infinity invalid operation +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INV_ISI\fR\fR +.ad +.RS 17n +.rt +infinity-infinity invalid operation +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INV_ZMI\fR\fR +.ad +.RS 17n +.rt +0*infinity invalid operation +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INV_SQRT\fR\fR +.ad +.RS 17n +.rt +square root of negative operand +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INV_SNAN\fR\fR +.ad +.RS 17n +.rt +signaling NaN +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INV_INT\fR\fR +.ad +.RS 17n +.rt +invalid integer conversion +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INV_CMP\fR\fR +.ad +.RS 17n +.rt +invalid comparison +.RE + +.sp +.LP +For convenience, the following combinations of values are also defined: +.sp +.ne 2 +.mk +.na +\fB\fBFEX_NONE\fR\fR +.ad +.RS 15n +.rt +no exceptions +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_INVALID\fR\fR +.ad +.RS 15n +.rt +all invalid operation exceptions +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_COMMON\fR\fR +.ad +.RS 15n +.rt +overflow, division by zero, and invalid operation +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_ALL\fR\fR +.ad +.RS 15n +.rt +all exceptions +.RE + +.sp +.LP +The \fBfex_set_handling()\fR function establishes the specified \fImode\fR for +handling the floating point exceptions identified by \fIex\fR. The selected +\fImode\fR determines the action to be taken when one of the indicated +exceptions occurs. It must be one of the following values: +.sp +.ne 2 +.mk +.na +\fB\fBFEX_NOHANDLER\fR\fR +.ad +.RS 17n +.rt +Trap but do not otherwise handle the exception, evoking instead whatever +ambient behavior would normally be in effect. This is the default behavior +when the exception's trap is enabled. The \fIhandler\fR parameter is ignored. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_NONSTOP\fR\fR +.ad +.RS 17n +.rt +Provide the IEEE 754 default result for the operation that caused the +exception, set the exception's flag, and continue execution. This is the +default behavior when the exception's trap is disabled. The \fIhandler\fR +parameter is ignored. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_ABORT\fR\fR +.ad +.RS 17n +.rt +Call \fBabort\fR(3C). The \fIhandler\fR parameter is ignored. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_SIGNAL\fR\fR +.ad +.RS 17n +.rt +Invoke the function *\fIhandler\fR with the parameters normally supplied to a +signal handler installed with \fBsigfpe\fR(3C). +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBFEX_CUSTOM\fR\fR +.ad +.RS 17n +.rt +Invoke the function *\fIhandler\fR as described in the next paragraph. +.RE + +.sp +.LP +In \fBFEX_CUSTOM\fR mode, when a floating point exception occurs, the handler +function is invoked as though its prototype were: +.sp +.in +2 +.nf +#include <fenv.h> +void handler(int ex, fex_info_t *info); +.fi +.in -2 + +.sp +.LP +On entry, \fIex\fR is the value (of the first twelve listed above) +corresponding to the exception that occurred, \fBinfo->op\fR indicates the +operation that caused the exception, \fBinfo->op1\fR and \fBinfo->op2\fR +contain the values of the operands, \fBinfo->res\fR contains the default +untrapped result value, and \fBinfo->flags\fR reflects the exception flags that +the operation would have set had it not been trapped. If the handler returns, +the value contained in \fBinfo->res\fR on exit is substituted for the result of +the operation, the flags indicated by \fBinfo->flags\fR are set, and execution +resumes at the point where the exception occurred. The handler might modify +\fBinfo->res\fR and \fBinfo->flags\fR to supply any desired result value and +flags. Alternatively, if the exception is underflow or overflow, the hander +might set +.sp +.LP +info->res.type = fex_nodata; +.sp +.LP +which causes the exponent-adjusted result specified by IEEE 754 to be +substituted. If the handler does not modify \fBinfo->res\fR or +\fBinfo->flags\fR, the effect is the same as if the exception had not been +trapped. +.sp +.LP +Although the default untrapped result of an exceptional operation is always +available to a \fBFEX_CUSTOM\fR handler, in some cases, one or both operands +may not be. In these cases, the handler may be invoked with \fBinfo->op1.type +== fex_nodata\fR or \fBinfo->op2.type == fex_nodata\fR to indicate that the +respective data structures do not contain valid data. (For example, +\fBinfo->op2.type == fex_nodata\fR if the exceptional operation is a unary +operation.) Before accessing the operand values, a custom handler should +always examine the \fBtype\fR field of the operand data structures to ensure +that they contain valid data in the appropriate format. +.sp +.LP +The \fBfex_get_handling()\fR function returns the current handling mode for the +exception specified by \fIex\fR, which must be one of the first twelve +exceptions listed above. +.sp +.LP +The \fBfex_getexcepthandler()\fR function saves the current handling modes and +associated data for the exceptions specified by \fIex\fR in the data structure +pointed to by \fIbuf\fR. The type \fBfex_handler_t\fR is defined in +<\fBfenv.h\fR>. +.sp +.LP +The \fBfex_setexcepthandler()\fR function restores the handling modes and +associated data for the exceptions specified by \fIex\fR from the data +structure pointed to by \fIbuf\fR. This data structure must have been set by a +previous call to \fBfex_getexcepthandler()\fR. Otherwise the effect on the +indicated modes is undefined. +.SH RETURN VALUES +.sp +.LP +The \fBfex_set_handling()\fR function returns a non-zero value if the requested +exception handling mode is established. Otherwise, it returns 0. +.SH EXAMPLES +.sp +.LP +The following example demonstrates how to substitute a predetermined value for +the result of a 0/0 invalid operation. +.sp +.in +2 +.nf +#include <math.h> +#include <fenv.h> + +double k; + +void presub(int ex, fex_info_t *info) { + info->res.type = fex_double; + info->res.val.d = k; +} + +int main() { + double x, w; + int i; + fex_handler_t buf; +/* + * save current 0/0 handler + */ + (void) fex_getexcepthandler(&buf, FEX_INV_ZDZ); +/* + * set up presubstitution handler for 0/0 + */ + (void) fex_set_handling(FEX_INV_ZDZ, FEX_CUSTOM, presub); +/* + * compute (k*x)/sin(x) for k=2.0, x=0.5, 0.4, ..., 0.1, 0.0 + */ + k = 2.0; + (void) printf("Evaluating f(x) = (k*x)/sin(x)\en\en"); + for (i = 5; i >= 0; i--) { + x = (double) i * 0.1; + w = (k * x) / sin(x); + (void) printf("\etx=%3.3f\et f(x) = % 1.20e\en", x, w); + } +/* + * restore old 0/0 handler + */ + (void) fex_setexcepthandler(&buf, FEX_INV_ZDZ); + return 0; +} +.fi +.in -2 + +.sp +.LP +The output from the preceding program reads: +.sp +.in +2 +.nf +Evaluating f(x) = (k*x)/sin(x) + + x=0.500 f(x) = 2.08582964293348816000e+00 + x=0.400 f(x) = 2.05434596443822626000e+00 + x=0.300 f(x) = 2.03031801709447368000e+00 + x=0.200 f(x) = 2.01339581906893761000e+00 + x=0.100 f(x) = 2.00333722632695554000e+00 + x=0.000 f(x) = 2.00000000000000000000e+00 +.fi +.in -2 + +.sp +.LP +When \fIx\fR = 0, \fIf(x)\fR is computed as 0/0 and an invalid operation +exception occurs. In this example, the value 2.0 is substituted for the +result. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +lw(2.75i) lw(2.75i) +lw(2.75i) lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +AvailabilitySUNWlibms, SUNWlmxs +Interface StabilityStable +MT-LevelMT-Safe (see Notes) +.TE + +.SH SEE ALSO +.sp +.LP +\fBsigfpe\fR(3C), \fBfeclearexcept\fR(3M), \fBfegetenv\fR(3M), +\fBfex_set_log\fR(3M), \fBattributes\fR(5) +.sp +.LP +\fINumerical Computation Guide\fR +.SH NOTES +.sp +.LP +In a multithreaded application, the preceding functions affect exception +handling modes only for the calling thread. +.sp +.LP +The functions described on this page automatically install and deinstall +\fBSIGFPE\fR handlers and set and clear the trap enable mode bits in the +floating point status register as needed. If a program uses these functions +and attempts to install a \fBSIGFPE\fR handler or control the trap enable mode +bits independently, the resulting behavior is not defined. +.sp +.LP +All traps are disabled before a handler installed in \fBFEX_CUSTOM\fR mode is +invoked. When the \fBSIGFPE\fR signal is blocked, as it is when such a handler +is invoked, the floating point environment, exception flags, and retrospective +diagnostic functions described in \fBfeclearexcept\fR(3M), \fBfegetenv\fR(3M), +and \fBfex_set_log\fR(3M) do not re-enable traps. Thus, the handler itself +always runs in \fBFEX_NONSTOP\fR mode with logging of retrospective diagnostics +disabled. Attempting to change these modes within the handler may not produce +the expected results. diff --git a/usr/src/man/man3m/fex_set_log.3m b/usr/src/man/man3m/fex_set_log.3m new file mode 100644 index 0000000000..051b0e5021 --- /dev/null +++ b/usr/src/man/man3m/fex_set_log.3m @@ -0,0 +1,209 @@ +'\" te +.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fex_set_log 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fex_set_log, fex_get_log, fex_set_log_depth, fex_get_log_depth, fex_log_entry +\- log retrospective diagnostics for floating point exceptions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... -lm [ \fIlibrary\fR... ] +#include <fenv.h> + +\fBint\fR \fBfex_set_log\fR(\fBFILE *\fR\fIfp\fR); +.fi + +.LP +.nf +\fBFILE *\fR\fBfex_get_log\fR(\fBvoid\fR); +.fi + +.LP +.nf +\fBint\fR \fBfex_set_log_depth\fR(\fBint\fR \fIdepth\fR); +.fi + +.LP +.nf +\fBint\fR \fBfex_get_log_depth\fR(\fBvoid\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBfex_log_entry\fR(\fBconst char *\fR\fImsg\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfex_set_log()\fR function enables logging of retrospective diagnostic +messages regarding floating point exceptions to the file specified by \fIfp\fR. +If \fIfp\fR is \fINULL\fR, logging is disabled. When a program starts, logging +is initially disabled. +.sp +.LP +The occurrence of any of the twelve exceptions listed in +\fBfex_set_handling\fR(3M) constitutes an event that can be logged. To prevent +the log from becoming exhorbitantly long, the logging mechanism eliminates +redundant entries by two methods. First, each exception is associated with a +\fIsite\fR in the program. The site is identified by the address of the +instruction that caused the exception together with a stack trace. Only the +first exception of a given type to occur at a given site will be logged. +Second, when \fBFEX_NONSTOP\fR handling mode is in effect for some exception, +only those occurrences of that exception that set its previously clear flag are +logged. Clearing a flag using \fBfeclearexcept()\fR allows the next occurrence +of the exception to be logged provided it does not occur at a site at which it +was previously logged. +.sp +.LP +Each of the different types of invalid operation exceptions can be logged at +the same site. Because all invalid operation exceptions share the same flag, +however, of those types for which \fBFEX_NONSTOP\fR mode is in effect, only the +first exception to set the flag will be logged. When the invalid operation +exception is raised by a call to \fBferaiseexcept\fR(3M) or +\fBfeupdateenv\fR(3M), which type of invalid operation is logged depends on the +implementation. +.sp +.LP +If an exception results in the creation of a log entry, the entry is created at +the time the exception occurs and before any exception handling actions +selected with \fBfex_set_handling()\fR are taken. In particular, the log entry +is available even if the program terminates as a result of the exception. The +log entry shows the type of exception, the address of the instruction that +caused it, how it will be handled, and the stack trace. If symbols are +available, the address of the excepting instruction and the addresses in the +stack trace are followed by the names of the corresponding symbols. +.sp +.LP +The \fBfex_get_log()\fR function returns the current log file. +.sp +.LP +The \fBfex_set_log_depth()\fR sets the maximum depth of the stack trace +recorded with each exception to \fIdepth\fR stack frames. The default depth is +100. +.sp +.LP +The\fBfex_get_log_depth()\fR function returns the current maximum stack trace +depth. +.sp +.LP +The \fBfex_log_entry()\fR function adds a user-supplied entry to the log. The +entry includes the string pointed to by \fImsg\fR and the stack trace. Like +entries for floating point exceptions, redundant user-supplied entries are +eliminated: only the first user-supplied entry with a given \fImsg\fR to be +requested from a given site will be logged. For the purpose of a user-supplied +entry, the site is defined only by the stack trace, which begins with the +function that called \fBfex_log_entry()\fR. +.SH RETURN VALUES +.sp +.LP +The \fBfex_set_log()\fR function returns a non-zero value if logging is enabled +or disabled accordingly and returns 0 otherwise. The \fBfex_set_log_depth()\fR +returns a non-zero value if the requested stack trace depth is established +(regardless of whether logging is enabled) and returns 0 otherwise. +.SH EXAMPLES +.sp +.LP +The following example demonstrates the output generated when a floating point +overflow occurs in \fBsscanf\fR(3C). +.sp +.in +2 +.nf +#include <fenv.h> + +int +main() { + double x; +/* + * enable logging of retrospective diagnostics + */ + (void) fex_set_log(stdout); +/* + * establish default handling for overflows + */ + (void) fex_set_handling(FEX_OVERFLOW, FEX_NONSTOP, NULL); +/* + * trigger an overflow in sscanf + */ + (void) sscanf("1.0e+400", "%lf", &x); + return 0; +} +.fi +.in -2 + +.sp +.LP +The output from the preceding program reads: +.sp +.in +2 +.nf +Floating point overflow at 0xef71cac4 __base_conversion_set_exceptio +n, nonstop mode + 0xef71cacc __base_conversion_set_exception + 0xef721820 _decimal_to_double + 0xef75aba8 number + 0xef75a94c __doscan_u + 0xef75ecf8 sscanf + 0x00010f20 main +.fi +.in -2 + +.sp +.LP +Recompiling the program or running it on another system can produce different +text addresses from those shown above. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +lw(2.75i) lw(2.75i) +lw(2.75i) lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +AvailabilitySUNWlibms, SUNWlmxs +Interface StabilityStable +MT-LevelMT-Safe (see NOTES) +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfegetenv\fR(3M), \fBferaiseexcept\fR(3M), +\fBfeupdateenv\fR(3M), \fBfex_set_handling\fR(3M), \fBattributes\fR(5) +.sp +.LP +\fINumerical Computation Guide\fR +.SH NOTES +.sp +.LP +All threads in a process share the same log file. Each call to +\fBfex_set_log()\fR preempts the previous one. +.sp +.LP +In addition to the log file itself, two additional file descriptors are used +during the creation of a log entry in order to obtain symbol names from the +executable and any shared objects it uses. These file descriptors are +relinquished once the log entry is written. If the file descriptors cannot be +allocated, symbols names are omitted from the stack trace. +.sp +.LP +The functions described on this page automatically install and deinstall +\fBSIGFPE\fR handlers and set and clear the trap enable mode bits in the +floating point status register as needed. If a program uses these functions +and attempts to install a \fBSIGFPE\fR handler or control the trap enable mode +bits independently, the resulting behavior is not defined. +.sp +.LP +As described in \fBfex_set_handling()\fR, when a handling function installed in +\fBFEX_CUSTOM\fR mode is invoked, all exception traps are disabled (and will +not be reenabled while \fBSIGFPE\fR is blocked). Thus, retrospective +diagnostic messages are not logged for exceptions that occur within such a +handler. diff --git a/usr/src/man/man3m/floor.3m b/usr/src/man/man3m/floor.3m new file mode 100644 index 0000000000..ddc993f041 --- /dev/null +++ b/usr/src/man/man3m/floor.3m @@ -0,0 +1,73 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH floor 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +floor, floorf, floorl \- floor function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBfloor\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBfloorf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBfloorl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the largest integral value not greater than \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the largest integral value +not greater than \fIx\fR, expressed as a \fBdouble\fR, \fBfloat\fR, or \fBlong +double\fR, as appropriate for the return type of the function. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-Inf or \(+-0, \fIx\fR is returned. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBceil\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/fma.3m b/usr/src/man/man3m/fma.3m new file mode 100644 index 0000000000..b79dae8df9 --- /dev/null +++ b/usr/src/man/man3m/fma.3m @@ -0,0 +1,125 @@ +'\" te +.\" Copyright (c) 2001, the Institute of ElectricalPortions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fma 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fma, fmaf, fmal \- floating-point multiply-add +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBfma\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR, \fBdouble\fR \fIz\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBfmaf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR, \fBfloat\fR \fIz\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBfmal\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR, \fBlong double\fR \fIz\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute (\fIx\fR * \fIy\fR) + \fIz\fR, rounded as one ternary +operation. They compute the value (as if) to infinite precision and round once +to the result format, according to the rounding mode characterized by the value +of \fBFLT_ROUNDS\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return (\fIx\fR * \fIy\fR) + +\fIz\fR, rounded as one ternary operation. +.sp +.LP +If \fIx\fR or \fIy\fR are NaN, a NaN is returned. +.sp +.LP +If \fIx\fR multiplied by \fIy\fR is an exact infinity and \fIz\fR is also an +infinity but with the opposite sign, a domain error occurs and a NaN is +returned. +.sp +.LP +If one of \fIx\fR and \fIy\fR is infinite, the other is 0, and \fIz\fR is not a +NaN, a domain error occurs and a NaN is returned. +.sp +.LP +If \fIx\fR*\fIy\fR is not 0*Inf nor Inf*0 and \fIz\fR is a NaN, a NaN is +returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR*\fIy\fR+\fIz\fR is invalid or the value \fIx\fR*\fIy\fR is +invalid. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception will be raised. +.RE + +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 16n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception will be raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/fmax.3m b/usr/src/man/man3m/fmax.3m new file mode 100644 index 0000000000..c2cee612c6 --- /dev/null +++ b/usr/src/man/man3m/fmax.3m @@ -0,0 +1,78 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fmax 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fmax, fmaxf, fmaxl \- determine maximum numeric value of two floating-point +numbers +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBfmax\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBfmaxf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBfmaxl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions determine the maximum numeric value of their arguments. NaN +arguments are treated as missing data: if one argument is a NaN and the other +numeric, these functions choose the numeric value. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the maximum numeric value of +their arguments. +.sp +.LP +If just one argument is a NaN, the other argument is returned. +.sp +.LP +If \fIx\fR and \fIy\fR are NaN, a NaN is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfdim\fR(3M), \fBfmin\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/fmin.3m b/usr/src/man/man3m/fmin.3m new file mode 100644 index 0000000000..826834fd04 --- /dev/null +++ b/usr/src/man/man3m/fmin.3m @@ -0,0 +1,78 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fmin 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fmin, fminf, fminl \- determine minimum numeric value of two floating-point +numbers +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBfmin\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBfminf\fR(\fBfloat float\fR \fIx\fR, \fBfloat\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBfminl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions determine the minimum numeric value of their arguments. NaN +arguments are treated as missing data: if one argument is a NaN and the other +numeric, these functions choose the numeric value. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the minimum numeric value of +their arguments. +.sp +.LP +If just one argument is a NaN, the other argument is returned. +.sp +.LP +If \fIx\fR and \fIy\fR are NaN, a NaN is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfdim\fR(3M), \fBfmax\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/fmod.3m b/usr/src/man/man3m/fmod.3m new file mode 100644 index 0000000000..967b1ccbab --- /dev/null +++ b/usr/src/man/man3m/fmod.3m @@ -0,0 +1,110 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fmod 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fmod, fmodf, fmodl \- floating-point remainder value function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBfmod\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBfmodf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBfmodl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions return the floating-point remainder of the division of \fIx\fR +by \fIy\fR. +.SH RETURN VALUES +.sp +.LP +These functions return the value \fIx\fR \(mi \fIi\fR * \fIy\fR, for some +integer \fIi\fR such that, if \fIy\fR is non-zero, the result has the same sign +as \fIx\fR and magnitude less than the magnitude of \fIy\fR. +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, a NaN is returned. +.sp +.LP +If \fIy\fR is 0, a domain error occurs and a NaN is returned. +.sp +.LP +If \fIx\fR is infinite, a domain error occurs and a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 and \fIy\fR is not 0, \(+-0 is returned. +.sp +.LP +If \fIx\fR is not infinite and \fIy\fR is \(+-Inf, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is infinite or \fIy\fR is 0. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBisnan\fR(3M), +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/fpclassify.3m b/usr/src/man/man3m/fpclassify.3m new file mode 100644 index 0000000000..e02c50f28e --- /dev/null +++ b/usr/src/man/man3m/fpclassify.3m @@ -0,0 +1,62 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH fpclassify 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +fpclassify \- classify real floating type +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBfpclassify\fR(\fBreal-floating\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBfpclassify()\fR macro classifies its argument value as NaN, infinite, +normal, subnormal, or zero. First, an argument represented in a format wider +than its semantic type is converted to its semantic type. Then classification +is based on the type of the argument. +.SH RETURN VALUES +.sp +.LP +The \fBfpclassify()\fR macro returns the value of the number classification +macro appropriate to the value of its argument. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisfinite\fR(3M), \fBisinf\fR(3M), \fBisnan\fR(3M), \fBisnormal\fR(3M), +\fBmath.h\fR(3HEAD), \fBsignbit\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/frexp.3m b/usr/src/man/man3m/frexp.3m new file mode 100644 index 0000000000..b419f55ac5 --- /dev/null +++ b/usr/src/man/man3m/frexp.3m @@ -0,0 +1,82 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Copyright 1989 AT&T +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH frexp 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +frexp, frexpf, frexpl \- extract mantissa and exponent from a floating-point +number +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBfrexp\fR(\fBdouble\fR \fInum\fR, \fBint *\fR\fIexp\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBfrexpf\fR(\fBfloat\fR \fInum\fR, \fBint *\fR\fIexp\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBfrexpl\fR(\fBlong double\fR \fInum\fR, \fBint *\fR\fIexp\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions break a floating-point number into a normalized fraction and an +integral power of 2. They store the integer exponent in the \fBint\fR object +pointed to by \fIexp\fR. +.SH RETURN VALUES +.sp +.LP +For finite arguments, these functions return the value \fIx\fR, such that +\fIx\fR is a \fBdouble\fR with magnitude in the interval [\(12, 1) or 0, and +\fInum\fR equals \fIx\fR times 2 raised to the power *\fIexp\fR. +.sp +.LP +If \fInum\fR is NaN, NaN is returned and the value of *\fIexp\fR is +unspecified. +.sp +.LP +If \fInum\fR is \(+- 0, \(+- 0 is returned and the value of *\fIexp\fR is 0. +.sp +.LP +If \fInum\fR is \(+-Inf, \fInum\fR is returned and the value of *\fIexp\fR is +unspecified. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisnan\fR(3M), \fBldexp\fR(3M), \fBmodf\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/hypot.3m b/usr/src/man/man3m/hypot.3m new file mode 100644 index 0000000000..f09d9cd1b2 --- /dev/null +++ b/usr/src/man/man3m/hypot.3m @@ -0,0 +1,118 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH hypot 3M "1 Sep 2002" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +hypot, hypotf, hypotl \- Euclidean distance function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBhypot\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBhypotf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBhypotl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the length of the square root of \fIx\fR^2 + \fIy\fR^2 +without undue overflow or underflow. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the length of the hypotenuse +of a right angled triangle with sides of length \fIx\fR^2 and \fIy\fR^2. +.sp +.LP +If the correct value would cause overflow, a range error occurs and +\fBhypot()\fR, \fBhypotf()\fR, and \fBhypotl()\fR return the value of the macro +\fBHUGE_VAL\fR, \fBHUGE_VALF\fR, and \fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR or \fIy\fR is \(+-Inf, +Inf is returned even if one of \fIx\fR or +\fIy\fR is NaN. +.sp +.LP +If \fIx\fR or \fIy\fR is NaN and the other is not \(+-Inf, a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +\fBhypot\fR(\fIx\fR,\fIy\fR), \fBhypot\fR(\fIy\fR,\fIx\fR), and +\fBhypot\fR(\fIx\fR, \(mi\fIy\fR) are equivalent. +.sp +.LP +\fBhypot\fR(\fIx\fR, \(+-0) is equivalent to \fBfabs\fR(\fIx\fR). +.sp +.LP +These functions takes precautions against underflow and overflow during +intermediate steps of the computation. +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfabs\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBsqrt\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/ilogb.3m b/usr/src/man/man3m/ilogb.3m new file mode 100644 index 0000000000..1bfeb88446 --- /dev/null +++ b/usr/src/man/man3m/ilogb.3m @@ -0,0 +1,123 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH ilogb 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +ilogb, ilogbf, ilogbl \- return an unbiased exponent +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBilogb\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBint\fR \fBilogbf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBint\fR \fBilogbl\fR(\fBlong double\fR \fIx\fR); +.fi + +.LP +.nf +cc [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBilogb\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBint\fR \fBilogbf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBint\fR \fBilogbl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions return the exponent part of their argument \fIx\fR. Formally, +the return value is the integral part of \fBlog\fR(r)| \fIx\fR | as a signed +integral value, for non-zero \fIx\fR, where \fIr\fR is the radix of the +machine's floating point arithmetic, which is the value of \fBFLT_RADIX\fR +defined in <\fBfloat.h\fR>. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the exponent part of \fIx\fR +as a signed integer value. They are equivalent to calling the corresponding +\fBlogb\fR(3M) function and casting the returned value to type \fBint\fR. +.sp +.LP +If \fIx\fR is 0, the value \fBFP_ILOGB0\fR is returned. For SUSv3-conforming +applications compiled with the \fBc99\fR compiler driver (see +\fBstandards\fR(5)), a domain error occurs. +.sp +.LP +If \fIx\fR is \(+-Inf, the value \fBINT_MAX\fR is returned. For +SUSv3-conforming applications compiled with the \fBc99\fR compiler driver, a +domain error occurs. +.sp +.LP +If \fIx\fR is NaN, the value \fBFP_ILOGBNAN\fR is returned. For +SUSv3-conforming applications compiled with the \fBc99\fR compiler driver, a +domain error occurs. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is zero, NaN, or \(+-Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.RE + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBlimits.h\fR(3HEAD), +\fBlogb\fR(3M), \fBmath.h\fR(3HEAD), \fBscalb\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/isfinite.3m b/usr/src/man/man3m/isfinite.3m new file mode 100644 index 0000000000..23cfcc2347 --- /dev/null +++ b/usr/src/man/man3m/isfinite.3m @@ -0,0 +1,62 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH isfinite 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +isfinite \- test for finite value +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisfinite\fR(\fBreal-floating\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBisfinite()\fR macro determines whether its argument has a finite value +(zero, subnormal, or normal, and not infinite or NaN). First, an argument +represented in a format wider than its semantic type is converted to its +semantic type. Then determination is based on the type of the argument. +.SH RETURN VALUES +.sp +.LP +The \fBisfinite()\fR macro returns a non-zero value if and only if its argument +has a finite value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfpclassify\fR(3M), \fBisinf\fR(3M), \fBisnan\fR(3M), \fBisnormal\fR(3M), +\fBmath.h\fR(3HEAD), \fBsignbit\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/isgreater.3m b/usr/src/man/man3m/isgreater.3m new file mode 100644 index 0000000000..ec5e4bda96 --- /dev/null +++ b/usr/src/man/man3m/isgreater.3m @@ -0,0 +1,80 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH isgreater 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +isgreater \- test if x greater than y +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisgreater\fR(\fBreal-floating\fR \fIx\fR, \fBreal-floating\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBisgreater()\fR macro determines whether its first argument is greater +than its second argument. The value of \fBisgreater\fR(\fIx\fR, \fIy\fR) is +equal to (\fIx\fR) > (\fIy\fR); however, unlike (\fIx\fR) > (\fIy\fR), +\fBisgreater\fR(\fIx\fR, \fIy\fR) does not raise the invalid floating-point +exception when \fIx\fR and \fIy\fR are unordered. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, the \fBisgreater()\fR macro returns the value of +(\fIx\fR) > (\fIy\fR). +.sp +.LP +If x or y is NaN, 0 is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +The relational and equality operators support the usual mathematical +relationships between numeric values. For any ordered pair of numeric values, +exactly one of the relationships (less, greater, and equal) is true. Relational +operators can raise the invalid floating-point exception when argument values +are NaNs. For a NaN and a numeric value, or for two NaNs, just the unordered +relationship is true. This macro is a quiet (non-floating-point exception +raising) version of a relational operator. It facilitates writing efficient +code that accounts for quiet NaNs without suffering the invalid floating-point +exception. In the \fBSYNOPSIS\fR section, \fBreal-floating\fR indicates that +the argument is an expression of \fBreal-floating\fR type. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisgreaterequal\fR(3M), \fBisless\fR(3M), \fBislessequal\fR(3M), +\fBislessgreater\fR(3M), \fBisunordered\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/isgreaterequal.3m b/usr/src/man/man3m/isgreaterequal.3m new file mode 100644 index 0000000000..9b059f68e8 --- /dev/null +++ b/usr/src/man/man3m/isgreaterequal.3m @@ -0,0 +1,81 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH isgreaterequal 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +isgreaterequal \- test if x greater than or equal to y +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisgreaterequal\fR(\fBreal-floating\fR \fIx\fR, \fBreal-floating\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBisgreaterequal()\fR macro determines whether its first argument is +greater than or equal to its second argument. The value of +\fBisgreaterequal\fR(\fIx\fR, \fIy\fR) is equal to (\fIx\fR) \(>= (\fIy\fR); +however, unlike (\fIx\fR) \(>= (\fIy\fR), \fBisgreaterequal\fR(\fIx\fR, +\fIy\fR) does not raise the invalid floating-point exception when \fIx\fR and +\fIy\fR are unordered. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, the \fBisgreaterequal()\fR macro returns the value +of (\fIx\fR) \(>= (\fIy\fR). +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, 0 is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +The relational and equality operators support the usual mathematical +relationships between numeric values. For any ordered pair of numeric values, +exactly one of the relationships (less, greater, and equal) is true. Relational +operators can raise the invalid floating-point exception when argument values +are NaNs. For a NaN and a numeric value, or for two NaNs, just the unordered +relationship is true. This macro is a quiet (non-floating-point exception +raising) version of a relational operator. It facilitates writing efficient +code that accounts for quiet NaNs without suffering the invalid floating-point +exception. In the \fBSYNOPSIS\fR section, \fBreal-floating\fR indicates that +the argument is an expression of \fBreal-floating\fR type. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisgreater\fR(3M), \fBisless\fR(3M), \fBislessequal\fR(3M), +\fBislessgreater\fR(3M), \fBisunordered\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/isinf.3m b/usr/src/man/man3m/isinf.3m new file mode 100644 index 0000000000..67496a184e --- /dev/null +++ b/usr/src/man/man3m/isinf.3m @@ -0,0 +1,63 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text +.\" are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical +.\" and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH isinf 3M "17 Nov 2008" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +isinf \- test for infinity +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisinf\fR(\fBreal-floating\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBisinf()\fR macro determines whether its argument value is an infinity +(positive or negative). First, an argument represented in a format wider than +its semantic type is converted to its semantic type. Then determination is +based on the type of the argument. +.SH RETURN VALUES +.sp +.LP +The \fBisinf()\fR macro returns a non-zero value if and only if its argument +has an infinite value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfpclassify\fR(3M), \fBisfinite\fR(3M), \fBisnan\fR(3M), \fBisnormal\fR(3M), +\fBmath.h\fR(3HEAD), \fBsignbit\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/isless.3m b/usr/src/man/man3m/isless.3m new file mode 100644 index 0000000000..1d1fb93035 --- /dev/null +++ b/usr/src/man/man3m/isless.3m @@ -0,0 +1,80 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH isless 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +isless \- test if x is less than y +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisless\fR(\fBreal-floating\fR \fIx\fR, \fBreal-floating\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBisless()\fR macro determines whether its first argument is less than its +second argument. The value of \fBisless\fR(\fIx\fR, \fIy\fR) is equal to +(\fIx\fR) < (\fIy\fR); however, unlike (\fIx\fR) < (\fIy\fR), +\fBisless\fR(\fIx\fR, \fIy\fR) does not raise the invalid floating-point +exception when \fIx\fR and \fIy\fR are unordered. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, the \fBisless()\fR macro returns the value of +(\fIx\fR) < (\fIy\fR). +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, 0 is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +The relational and equality operators support the usual mathematical +relationships between numeric values. For any ordered pair of numeric values, +exactly one of the relationships (less, greater, and equal) is true. Relational +operators can raise the invalid floating-point exception when argument values +are NaNs. For a NaN and a numeric value, or for two NaNs, just the unordered +relationship is true. This macro is a quiet (non-floating-point exception +raising) version of a relational operator. It facilitates writing efficient +code that accounts for quiet NaNs without suffering the invalid floating-point +exception. In the \fBSYNOPSIS\fR section, \fBreal-floating\fR indicates that +the argument is an expression of \fBreal-floating\fR type. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisgreater\fR(3M), \fBisgreaterequal\fR(3M), \fBislessequal\fR(3M), +\fBislessgreater\fR(3M), \fBisunordered\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/islessequal.3m b/usr/src/man/man3m/islessequal.3m new file mode 100644 index 0000000000..c47897190e --- /dev/null +++ b/usr/src/man/man3m/islessequal.3m @@ -0,0 +1,80 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH islessequal 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +islessequal \- test if x is less than or equal to y +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBislessequal\fR(\fBreal-floating\fR \fIx\fR, \fBreal-floating\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBislessequal()\fR macro determines whether its first argument is less +than or equal to its second argument. The value of \fBislessequal\fR(\fIx\fR, +\fIy\fR) is equal to (\fIx\fR) \(<= (\fIy\fR); however, unlike (\fIx\fR) \(<= +(\fIy\fR), \fBislessequal\fR(\fIx\fR, \fIy\fR) does not raise the invalid +floating-point exception when \fIx\fR and \fIy\fR are unordered. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, the \fBislessequal()\fR macro returns the value of +(\fIx\fR) \(<= (\fIy\fR). +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, 0 is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +The relational and equality operators support the usual mathematical +relationships between numeric values. For any ordered pair of numeric values, +exactly one of the relationships (less, greater, and equal) is true. Relational +operators can raise the invalid floating-point exception when argument values +are NaNs. For a NaN and a numeric value, or for two NaNs, just the unordered +relationship is true. This macro is a quiet (non-floating-point exception +raising) version of a relational operator. It facilitates writing efficient +code that accounts for quiet NaNs without suffering the invalid floating-point +exception. In the \fBSYNOPSIS\fR section, \fBreal-floating\fR indicates that +the argument is an expression of \fBreal-floating\fR type. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisgreater\fR(3M), \fBisgreaterequal\fR(3M), \fBisless\fR(3M), +\fBislessgreater\fR(3M), \fBisunordered\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/islessgreater.3m b/usr/src/man/man3m/islessgreater.3m new file mode 100644 index 0000000000..d8b43e2416 --- /dev/null +++ b/usr/src/man/man3m/islessgreater.3m @@ -0,0 +1,81 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH islessgreater 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +islessgreater \- test if x is less than or greater than y +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBislessgreater\fR(\fBreal-floating\fR \fIx\fR, \fBreal-floating\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBislessgreater()\fR macro determines whether its first argument is less +than or greater than its second argument. The \fBislessgreater\fR(\fIx\fR, +\fIy\fR) macro is similar to (\fIx\fR) < (\fIy\fR) || (\fIx\fR) > (\fIy\fR); +however, \fBislessgreater\fR(\fIx\fR, \fIy\fR) does not raise the invalid +floating-point exception when x and y are unordered (nor does it evaluate +\fIx\fR and \fIy\fR twice). +.SH RETURN VALUES +.sp +.LP +Upon successful completion, the \fBislessgreater()\fR macro returns the value +of (\fIx\fR) < (\fIy\fR) || (\fIx\fR) > (\fIy\fR). +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, 0 is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +The relational and equality operators support the usual mathematical +relationships between numeric values. For any ordered pair of numeric values, +exactly one of the relationships (less, greater, and equal) is true. Relational +operators can raise the invalid floating-point exception when argument values +are NaNs. For a NaN and a numeric value, or for two NaNs, just the unordered +relationship is true. This macro is a quiet (non-floating-point exception +raising) version of a relational operator. It facilitates writing efficient +code that accounts for quiet NaNs without suffering the invalid floating-point +exception. In the \fBSYNOPSIS\fR section, \fBreal-floating\fR indicates that +the argument is an expression of \fBreal-floating\fR type. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisgreater\fR(3M), \fBisgreaterequal\fR(3M), \fBisless\fR(3M), +\fBislessequal\fR(3M), \fBisunordered\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/isnan.3m b/usr/src/man/man3m/isnan.3m new file mode 100644 index 0000000000..b5747b30e5 --- /dev/null +++ b/usr/src/man/man3m/isnan.3m @@ -0,0 +1,89 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH isnan 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +isnan \- test for NaN +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisnan\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisnan\fR(\fBreal\(emfloating\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +In C90 mode, the \fBisnan()\fR function tests whether \fIx\fR is NaN. +.sp +.LP +In C99 mode, the \fBisnan()\fR macro determines whether its argument value is +NaN. First, an argument represented in a format wider than its semantic type is +converted to its semantic type. The determination is then based on the type of +the argument. +.SH RETURN VALUES +.sp +.LP +Both the \fBisnan()\fR function and macro return non-zero if and only if +\fIx\fR is NaN. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH WARNINGS +.sp +.LP +In C99 mode, the practice of explicitly supplying a prototype for \fBisnan()\fR +after the line +.sp +.in +2 +.nf +#include <math.h> +.fi +.in -2 + +.sp +.LP +is obsolete and will no longer work. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfpclassify\fR(3M), \fBisfinite\fR(3M), \fBisinf\fR(3M), \fBisnormal\fR(3M), +\fBmath.h\fR(3HEAD), \fBsignbit\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/isnormal.3m b/usr/src/man/man3m/isnormal.3m new file mode 100644 index 0000000000..f85c2f9280 --- /dev/null +++ b/usr/src/man/man3m/isnormal.3m @@ -0,0 +1,62 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH isnormal 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +isnormal \- test for a normal value +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisnormal\fR(\fBreal-floating\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBisnormal()\fR macro determines whether its argument value is normal +(neither zero, subnormal, infinite, nor NaN). First, an argument represented in +a format wider than its semantic type is converted to its semantic type. Then +determination is based on the type of the argument. +.SH RETURN VALUES +.sp +.LP +The \fBisnormal()\fR macro returns a non-zero value if and only if its argument +has a normal value. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfpclassify\fR(3M), \fBisfinite\fR(3M), \fBisinf\fR(3M), \fBisnan\fR(3M), +\fBmath.h\fR(3HEAD), \fBsignbit\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/isunordered.3m b/usr/src/man/man3m/isunordered.3m new file mode 100644 index 0000000000..ff6d909c7c --- /dev/null +++ b/usr/src/man/man3m/isunordered.3m @@ -0,0 +1,73 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH isunordered 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +isunordered \- test if arguments are unordered +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBisunordered\fR(\fBreal-floating\fR \fIx\fR, \fBreal-floating\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBisunordered()\fR macro determines whether its arguments are unordered. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, the \fBisunordered()\fR macro returns 1 if its +arguments are unordered and 0 otherwise. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +The relational and equality operators support the usual mathematical +relationships between numeric values. For any ordered pair of numeric values, +exactly one of the relationships (less, greater, and equal) is true. Relational +operators can raise the invalid floating-point exception when argument values +are NaNs. For a NaN and a numeric value, or for two NaNs, just the unordered +relationship is true. This macro is a quiet (non-floating-point exception +raising) version of a relational operator. It facilitates writing efficient +code that accounts for quiet NaNs without suffering the invalid floating-point +exception. In the \fBSYNOPSIS\fR section, \fBreal-floating\fR indicates that +the argument shall be an expression of \fBreal-floating\fR type. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBisgreater\fR(3M), \fBisgreaterequal\fR(3M), \fBisless\fR(3M), +\fBislessequal\fR(3M), \fBislessgreater\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/j0.3m b/usr/src/man/man3m/j0.3m new file mode 100644 index 0000000000..89ed44afd5 --- /dev/null +++ b/usr/src/man/man3m/j0.3m @@ -0,0 +1,109 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH j0 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \- Bessel functions of the first kind +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBj0\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBj0f\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBj0l\fR(\fBlong double\fR \fIx\fR); +.fi + +.LP +.nf +\fBdouble\fR \fBj1\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBj1f\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBj1l\fR(\fBlong double\fR \fIx\fR); +.fi + +.LP +.nf +\fBdouble\fR \fBjn\fR(\fBint\fR \fIn\fR, \fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBjnf\fR(\fBint\fR \fIn\fR, \fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBjnl\fR(\fBint\fR \fIn\fR, \fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute Bessel functions of \fIx\fR of the first kind of orders +0, 1 and \fIn\fR respectively. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the relevant Bessel value of +\fIx\fR of the first kind. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilitySee below. +_ +MT-LevelMT-Safe +.TE + +.sp +.LP +The \fBj0()\fR, \fBj1()\fR, and \fBjn()\fR functions are Standard. The +\fBj0f()\fR, \fBj0l()\fR, \fBj1f()\fR, \fBj1l()\fR, \fBjnf()\fR, and +\fBjnl()\fR functions are Stable. +.SH SEE ALSO +.sp +.LP +\fBisnan\fR(3M), \fBy0\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/ldexp.3m b/usr/src/man/man3m/ldexp.3m new file mode 100644 index 0000000000..1839f0fe15 --- /dev/null +++ b/usr/src/man/man3m/ldexp.3m @@ -0,0 +1,116 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH ldexp 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +ldexp, ldexpf, ldexpl \- load exponent of a floating point number +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBldexp\fR(\fBdouble\fR x, \fBint\fR exp); +.fi + +.LP +.nf +\fBfloat\fR \fBldexpf\fR(\fBfloat\fR x, \fBint\fR exp); +.fi + +.LP +.nf +\fBlong double\fR \fBldexpl\fR(\fBlong double\fR x, \fBint\fR exp); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions computes the quantity x\|* 2^exp. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return \fIx\fR multiplied by 2 +raised to the power \fIexp\fR. +.sp +.LP +If these functions would cause overflow, a range error occurs and +\fBldexp()\fR, \fBldexpf()\fR, and \fBldexpl()\fR return \fB\(+-HUGE_VAL\fR, +\fB\(+-HUGE_VALF\fR, and \fB\(+-HUGE_VALL\fR (according to the sign of +\fIx\fR), respectively. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+-Inf, \fIx\fR is returned. +.sp +.LP +If \fIexp\fR is 0, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception is raised. +.sp +The \fBldexp()\fR function sets \fBerrno\fR to \fBERANGE\fR if the result +overflows. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBldexp()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBldexpf()\fR +and \fBldexpl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfrexp\fR(3M), \fBisnan\fR(3M), \fBmodf\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/lgamma.3m b/usr/src/man/man3m/lgamma.3m new file mode 100644 index 0000000000..745bb00313 --- /dev/null +++ b/usr/src/man/man3m/lgamma.3m @@ -0,0 +1,214 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical +.\" and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. +.\" All Rights Reserved. +.\" Copyright (c) 1983 Regents of the University +.\" of California. All rights reserved. The Berkeley software License Agreement +.\" specifies the terms and conditions for redistribution. +.\" Portions Copyright (c) 2006, Sun Microsystems, +.\" Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.TH lgamma 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +lgamma, lgammaf, lgammal, lgamma_r, lgammaf_r, lgammal_r, gamma, gammaf, +gammal, gamma_r, gammaf_r, gammal_r \- log gamma function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +extern int signgam; + +\fBdouble\fR \fBlgamma\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBlgammaf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBlgammal\fR(\fBlong double\fR \fIx\fR); +.fi + +.LP +.nf +\fBdouble\fR \fBgamma\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBgammaf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBgammal\fR(\fBlong double\fR \fIx\fR); +.fi + +.LP +.nf +\fBdouble\fR \fBlgamma_r\fR(\fBdouble\fR \fIx\fR, \fBint *\fR\fIsigngamp\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBlgammaf_r\fR(\fBfloat\fR \fIx\fR, \fBint *\fR\fIsigngamp\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBlgammal_r\fR(\fBlong double\fR \fIx\fR, \fBint *\fR\fIsigngamp\fR); +.fi + +.LP +.nf +\fBdouble\fR \fBgamma_r\fR(\fBdouble\fR \fIx\fR, \fBint *\fR\fIsigngamp\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBgammaf_r\fR(\fBfloat\fR \fIx\fR, \fBint *\fR\fIsigngamp\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBgammal_r\fR(\fBlong double\fR \fIx\fR, \fBint *\fR\fIsigngamp\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions return +.sp +ln||~(x)| +.sp +.LP +where +.sp +|~(x) = integral from 0 to +Infinity of pow(t,x-1)*exp(-t) dt +.sp +.LP +for x > 0 and +.sp +|~(x) = n/(|~(1-x)sin(nx)) +.sp +.LP +for x < 1. +.sp +.LP +These functions use the external integer \fBsigngam\fR to return the sign of +\fB|~(x)\fR while \fBlgamma_r()\fR and \fBgamma_r()\fR use the user-allocated +space addressed by \fBsigngamp\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the logarithmic gamma of +\fIx\fR. +.sp +.LP +If \fIx\fR is a non-positive integer, a pole error occurs and these functions +return +\fBHUGE_VAL\fR, +\fBHUGE_VALF\fR, and +\fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is 1 or 2, +0 shall be returned. +.sp +.LP +If \fIx\fR is \(+-Inf, +Inf is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 14n +.rt +The \fIx\fR argument is a negative integer or 0. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the divide-by-zero floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +In the case of \fBlgamma()\fR, do not use the expression +\fBsigngam*exp(lgamma(x))\fR to compute +.sp +`g := |~(x)' +.sp +.LP +Instead compute \fBlgamma()\fR first: +.sp +.LP +\fBlg = lgamma(x); g = signgam*exp(lg);\fR +.sp +.LP +only after \fBlgamma()\fR has returned can \fBsigngam\fR be correct. Note that +\fB|~(x)\fR must overflow when \fIx\fR is large enough, underflow when +\(mi\fIx\fR is large enough, and generate a division by 0 exception at the +singularities \fIx\fR a nonpositive integer. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilitySee below. +_ +MT-LevelSee below. +.TE + +.sp +.LP +The \fBlgamma()\fR, \fBlgammaf()\fR, \fBlgammal()\fR, and \fBgamma()\fR +functions are Standard. The \fBlgamma_r()\fR, \fBlgammaf_r()\fR, +\fBlgammal_r()\fR, \fBgamma_r()\fR, \fBgammaf_r()\fR, and \fBgammal_r()\fR, +functions are Stable. +.sp +.LP +The \fBlgamma()\fR, \fBlgammaf()\fR, \fBlgammal()\fR, \fBgamma()\fR, +\fBgammaf()\fR, and \fBgammal()\fR functions are Unsafe in multithreaded +applications. The \fBlgamma_r()\fR, \fBlgammaf_r()\fR, \fBlgammal_r()\fR, +\fBgamma_r()\fR, \fBgammaf_r()\fR, and \fBgammal_r()\fR functions are MT-Safe +and should be used instead. +.SH SEE ALSO +.sp +.LP +\fBexp\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) +.SH NOTES +.sp +.LP +When compiling multithreaded applications, the \fB_REENTRANT\fR flag must be +defined on the compile line. This flag should only be used in multithreaded +applications. diff --git a/usr/src/man/man3m/llrint.3m b/usr/src/man/man3m/llrint.3m new file mode 100644 index 0000000000..4ef3e361ab --- /dev/null +++ b/usr/src/man/man3m/llrint.3m @@ -0,0 +1,119 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH llrint 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +llrint, llrintf, llrintl \- round to nearest integer value using current +rounding direction +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBlong long\fR \fBllrint\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong long\fR \fBllrintf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong long\fR \fBllrintl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions round their argument to the nearest integer value, rounding +according to the current rounding direction. +.SH RETURN VALUES +.sp +.LP + Upon successful completion, these functions return the rounded integer value. +.sp +.LP +If \fIx\fR is NaN, a domain error occurs and an unspecified value is returned. +.sp +.LP +If \fIx\fR is +Inf, a domain error occurs and an unspecified value is returned. +.sp +.LP +If \fIx\fR is -Inf, a domain error occurs and an unspecified value is returned. +.sp +.LP +If the correct value is positive and too large to represent as a \fBlong +long\fR, a domain error occurs and an unspecified value is returned. +.sp +.LP + If the correct value is negative and too large to represent as a \fBlong +long\fR, a domain error occurs and an unspecified value is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is NaN or \(+-Inf, or the correct value is not +representable as an integer. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception will be raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +These functions provide floating-to-integer conversions. They round according +to the current rounding direction. If the rounded value is outside the range of +the return type, the numeric result is unspecified and the invalid +floating-point exception is raised. When they raise no other floating-point +exception and the result differs from the argument, they raise the inexact +floating-point exception. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBlrint\fR(3M), +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/llround.3m b/usr/src/man/man3m/llround.3m new file mode 100644 index 0000000000..c2d2cd7ce7 --- /dev/null +++ b/usr/src/man/man3m/llround.3m @@ -0,0 +1,117 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH llround 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +llround, llroundf, llroundl \- round to nearest integer value +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBlong long\fR \fBllround\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong long\fR \fBllroundf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong long\fR \fBllroundl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions rounds their argument to the nearest integer value, rounding +halfway cases away from 0 regardless of the current rounding direction. +.SH RETURN VALUES +.sp +.LP + Upon successful completion, these functions return the rounded integer value. +.sp +.LP +If \fIx\fR is NaN, a domain error occurs and an unspecified value is returned. +.sp +.LP +If \fIx\fR is +Inf, a domain error occurs and an unspecified value is returned. +.sp +.LP +If \fIx\fR is -Inf, a domain error occurs and an unspecified value is returned. +.sp +.LP +If the correct value is positive and too large to represent as a \fBlong +long\fR, a domain error occurs and an unspecified value is returned. +.sp +.LP + If the correct value is negative and too large to represent as a \fBlong +long\fR, a domain error occurs and an unspecified value is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is NaN or \(+-Inf, or the correct value is not +representable as an integer. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception will be raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +These functions differ from the \fBllrint\fR(3M) functions in that the default +rounding direction for the \fBllround()\fR functions round halfway cases away +from 0 and need not raise the inexact floating-point exception for non-integer +arguments that round to within the range of the return type. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBllrint\fR(3M), +\fBlrint\fR(3M), \fBlround\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/log.3m b/usr/src/man/man3m/log.3m new file mode 100644 index 0000000000..b126a266aa --- /dev/null +++ b/usr/src/man/man3m/log.3m @@ -0,0 +1,139 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH log 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +log, logf, logl \- natural logarithm function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBlog\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBlogf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBlogl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the natural logarithm of their argument \fIx\fR, +log(\fIe\fR)(\fIx\fR). +.SH RETURN VALUES +.sp +.LP +Upon successful completion, \fBlog()\fR returns the natural logarithm of +\fIx\fR. +.sp +.LP +If \fIx\fR is \(+-0, a pole error occurs and \fBlog()\fR, \fBlogf()\fR, and +\fBlogl()\fR return \(mi\fBHUGE_VAL\fR, \(mi\fBHUGE_VALF\fR, and +\(mi\fBHUGE_VALL\fR, respectively. +.sp +.LP +For finite values of \fIx\fR that are less than 0, or if \fIx\fR is \(miInf, a +domain error occurs and a NaN is returned. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is 1, +0 is returned. +.sp +.LP +If \fIx\fR is +Inf, \fIx\fR is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBlog()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The finite value of \fIx\fR is negative, or \fIx\fR is -Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBlog()\fR function sets \fBerrno\fR to \fBEDOM\fR if the value of \fIx\fR +is negative. +.RE + +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is 0. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the divide-by-zero floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBlog()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBlogf()\fR and +\fBlogl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBexp\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBlog10\fR(3M), \fBlog1p\fR(3M), \fBmath.h\fR(3HEAD), +\fBmatherr\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/log10.3m b/usr/src/man/man3m/log10.3m new file mode 100644 index 0000000000..d59a472d58 --- /dev/null +++ b/usr/src/man/man3m/log10.3m @@ -0,0 +1,138 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH log10 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +log10, log10f, log10l \- base 10 logarithm function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBlog10\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBlog10f\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBlog10l\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the base 10 logarithm of \fIx\fR, log(10)(\fIx\fR). +.SH RETURN VALUES +.sp +.LP +Upon successful completion, \fBlog10()\fR returns the base 10 logarithm of +\fIx\fR. +.sp +.LP +If \fIx\fR is \(+-0, a pole error occurs and \fBlog10()\fR, \fBlog10f()\fR, and +\fBlog10l()\fR return \(mi\fBHUGE_VAL\fR, \(mi\fBHUGE_VALF\fR, and +\(mi\fBHUGE_VALL\fR, respectively. +.sp +.LP +For finite values of \fIx\fR that are less than 0, or if \fIx\fR is \(miInf, a +domain error occurs and a NaN is returned. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is 1, +0 is returned. +.sp +.LP +If \fIx\fR is +Inf, \fIx\fR is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBlog10()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The finite value of \fIx\fR is negative, or \fIx\fR is -Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBlog10()\fR function sets \fBerrno\fR to \fBEDOM\fR if the value of +\fIx\fR is negative. +.RE + +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is 0. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the divide-by-zero floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBlog10()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBlog10f()\fR +and \fBlog10l()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBisnan\fR(3M), +\fBlog\fR(3M), \fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBpow\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/log1p.3m b/usr/src/man/man3m/log1p.3m new file mode 100644 index 0000000000..f7d7ba2746 --- /dev/null +++ b/usr/src/man/man3m/log1p.3m @@ -0,0 +1,134 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH log1p 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +log1p, log1pf, log1pl \- compute natural logarithm +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBlog1p\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBlog1pf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBlog1pl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute log(e)(1.0 + \fIx\fR). +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the natural logarithm of 1.0 ++ \fIx\fR. +.sp +.LP +If \fIx\fR is \(mi1, a pole error occurs and \fBlog1p()\fR, \fBlog1pf()\fR, and +\fBlog1pl()\fR return \(mi\fBHUGE_VAL\fR, \(mi\fBHUGE_VALF\fR, and +\(mi\fBHUGE_VALL\fR, respectively. +.sp +.LP +For finite values of \fIx\fR that are less than \(mi1, or if \fIx\fR is +\(miInf, a domain error occurs and a NaN is returned. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or +Inf, \fIx\fR is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBlog1p()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The finite value of \fIx\fR is less than \(mi1, or \fIx\fR is -Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBlog1p()\fR function sets \fBerrno\fR to \fBEDOM\fR if the value of +\fIx\fR is less than \(mi1. +.RE + +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is \(mi1. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the divide-by-zero floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBlog1p()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBlog1pf()\fR +and \fBlog1pl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBlog\fR(3M), +\fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/log2.3m b/usr/src/man/man3m/log2.3m new file mode 100644 index 0000000000..d7c4af3c95 --- /dev/null +++ b/usr/src/man/man3m/log2.3m @@ -0,0 +1,125 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH log2 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +log2, log2f, log2l \- compute base 2 logarithm functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBlog2\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBlog2f\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBlog2l\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the base 2 logarithm of their argument \fIx\fR, +\fBlog2\fR(\fIx\fR). +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the base 2 logarithm of +\fIx\fR. +.sp +.LP +If \fIx\fR is \(+-0, a pole error occurs and \fBlog2()\fR, \fBlog2f()\fR, and +\fBlog2l()\fR return \(mi\fBHUGE_VAL\fR, \(mi\fBHUGE_VALF\fR, and +\(mi\fBHUGE_VALL\fR, respectively. +.sp +.LP +For finite values of \fIx\fR that are less than 0, or if \fIx\fR is \(miInf a +domain error occurs and a NaN is returned. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is 1, +0 is returned. +.sp +.LP +If \fIx\fR is +Inf, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The finite value of \fIx\fR is less than 0, or \fIx\fR is \(miInf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.RE + +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is 0. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the divide-by-zero floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBlog\fR(3M), +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/logb.3m b/usr/src/man/man3m/logb.3m new file mode 100644 index 0000000000..f2e22cb152 --- /dev/null +++ b/usr/src/man/man3m/logb.3m @@ -0,0 +1,152 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH logb 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +logb, logbf, logbl \- radix-independent exponent +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBlogb\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBlogbf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBlogbl\fR(\fBlong double\fR \fIx\fR); +.fi + +.LP +.nf +cc [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBlogb\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBlogbf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBlogbl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the exponent of \fIx\fR, which is the integral part of +log(\fIr\fR) |\fIx\fR|, as a signed floating point value, for non-zero \fIx\fR, +where \fIr\fR is the radix of the machine's floating-point arithmetic, which is +the value of \fBFLT_RADIX\fR defined in the <\fBfloat.h\fR> header. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the exponent of \fIx\fR. +.sp +.LP +If \fIx\fR is subnormal: +.RS +4 +.TP +.ie t \(bu +.el o +For SUSv3-conforming applications compiled with the \fBc99\fR compiler driver +(see \fBstandards\fR(5)), the exponent of \fIx\fR as if \fIx\fR were normalized +is returned. +.RE +.RS +4 +.TP +.ie t \(bu +.el o +Otherwise, if compiled with the \fBcc\fR compiler driver, \(mi1022, \(mi126, +and \(mi16382 are returned for \fBlogb()\fR, \fBlogbf()\fR, and \fBlogbl()\fR, +respectively. +.RE +.sp +.LP +If \fIx\fR is \(+-0, a pole error occurs and \fBlogb()\fR, \fBlogbf()\fR, and +\fBlogbl()\fR return \(mi\fBHUGE_VAL\fR, \(mi\fBHUGE_VALF\fR, and +\(mi\fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, +Inf is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 14n +.rt +The value of \fIx\fR is \(+-0. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the divide-by-zero floating-point exception is raised. +.sp +The \fBlogb()\fR function sets \fBerrno\fR to \fBEDOM\fR if the value of +\fIx\fR is 0. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBlogb()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBlogbf()\fR +and \fBlogbl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBilogb\fR(3M), +\fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBscalb\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/lrint.3m b/usr/src/man/man3m/lrint.3m new file mode 100644 index 0000000000..170a2c8f87 --- /dev/null +++ b/usr/src/man/man3m/lrint.3m @@ -0,0 +1,112 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH lrint 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +lrint, lrintf, lrintl \- round to nearest integer value using current rounding +direction +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBlong\fR \fBlrint\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong\fR \fBlrintf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong\fR \fBlrintl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions round their argument to the nearest integer value, rounding +according to the current rounding direction. +.SH RETURN VALUES +.sp +.LP + Upon successful completion, these functions return the rounded integer value. +.sp +.LP +If \fIx\fR is NaN, a domain error occurs and an unspecified value is returned. +.sp +.LP +If \fIx\fR is +Inf, a domain error occurs and an unspecified value is returned. +.sp +.LP +If \fIx\fR is \(miInf, a domain error occurs and an unspecified value is +returned. +.sp +.LP +If the correct value is positive and too large to represent as a \fBlong\fR, a +domain error occurs and an unspecified value is returned. +.sp +.LP +If the correct value is negative and too large to represent as a \fBlong\fR, a +domain error occurs and an unspecified value is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is NaN or \(+-Inf, or the correct value is not +representable as an integer. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBllrint\fR(3M), +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/lround.3m b/usr/src/man/man3m/lround.3m new file mode 100644 index 0000000000..4b85ce2362 --- /dev/null +++ b/usr/src/man/man3m/lround.3m @@ -0,0 +1,111 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH lround 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +lround, lroundf, lroundl \- round to nearest integer value +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBlong\fR \fBlround\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong\fR \fBlroundf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong\fR \fBlroundl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions round their argument to the nearest integer value, rounding +halfway cases away from zero, regardless of the current rounding direction. +.SH RETURN VALUES +.sp +.LP + Upon successful completion, these functions return the rounded integer value. +.sp +.LP +If \fIx\fR is NaN, a domain error occurs and an unspecified value is returned. +.sp +.LP +If \fIx\fR is +Inf, a domain error occurs and an unspecified value is returned. +.sp +.LP +If \fIx\fR is \(miInf, a domain error occurs and an unspecified value is +returned. +.sp +.LP +If the correct value is positive and too large to represent as a \fBlong\fR, a +domain error occurs and an unspecified value is returned. +.sp +.LP +If the correct value is negative and too large to represent as a \fBlong\fR, a +domain error occurs and an unspecified value is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is NaN or \(+-Inf, or the correct value is not +representable as an integer. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBllround\fR(3M), +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/matherr.3m b/usr/src/man/man3m/matherr.3m new file mode 100644 index 0000000000..4acdb98e7d --- /dev/null +++ b/usr/src/man/man3m/matherr.3m @@ -0,0 +1,557 @@ +'\" te +.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH matherr 3M "23 Sep 1997" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +matherr \- math library exception-handling function +.SH SYNOPSIS +.LP +.nf +#include <math.h> + +\fBint\fR \fBmatherr\fR(\fBstruct exception *\fR\fIexc\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The System V Interface Definition, Third Edition (SVID3) specifies that certain +\fBlibm\fR functions call \fBmatherr()\fR when exceptions are detected. Users +may define their own mechanisms for handling exceptions, by including a +function named \fBmatherr()\fR in their programs. The \fBmatherr()\fR function +is of the form described above. When an exception occurs, a pointer to the +exception structure \fIexc\fR will be passed to the user-supplied +\fBmatherr()\fR function. This structure, which is defined in the +\fB<math.h>\fR header file, is as follows: +.sp +.in +2 +.nf +struct exception { + int type; + char *name; + double arg1, arg2, retval; +}; +.fi +.in -2 + +.sp +.LP +The \fBtype\fR member is an integer describing the type of exception that has +occurred, from the following list of constants (defined in the header file): +.sp +.ne 2 +.mk +.na +\fB\fBDOMAIN\fR\fR +.ad +.RS 13n +.rt +argument domain exception +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSING\fR\fR +.ad +.RS 13n +.rt +argument singularity +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBOVERFLOW\fR\fR +.ad +.RS 13n +.rt +overflow range exception +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBUNDERFLOW\fR\fR +.ad +.RS 13n +.rt +underflow range exception +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTLOSS\fR\fR +.ad +.RS 13n +.rt +total loss of significance +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBPLOSS\fR\fR +.ad +.RS 13n +.rt +partial loss of significance +.RE + +.sp +.LP +Both \fBTLOSS\fR and \fBPLOSS\fR reflect limitations of particular algorithms +for trigonometric functions that suffer abrupt declines in accuracy at definite +boundaries. Since the implementation does not suffer such abrupt declines, +\fBPLOSS\fR is never signaled. \fBTLOSS\fR is signaled for Bessel functions +\fIonly\fR to satisfy SVID3 requirements. +.sp +.LP +The \fBname\fR member points to a string containing the name of the function +that incurred the exception. The \fBarg1\fR and \fBarg2\fR members are the +arguments with which the function was invoked. \fBretval\fR is set to the +default value that will be returned by the function unless the user's +\fBmatherr()\fR sets it to a different value. +.sp +.LP +If the user's \fBmatherr()\fR function returns non-zero, no exception message +will be printed and \fBerrno\fR is not set. +.SH SVID3 STANDARD CONFORMANCE +.sp +.LP +When an application is built as a SVID3 conforming application (see +\fBstandards\fR(5)), if \fBmatherr()\fR is not supplied by the user, the +default matherr exception-handling mechanisms, summarized in the table below, +are invoked upon exception: +.sp +.ne 2 +.mk +.na +\fB\fBDOMAIN\fR\fR +.ad +.RS 13n +.rt +0.0 is usually returned, \fBerrno\fR is set to \fBEDOM\fR and a message is +usually printed on standard error. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBSING\fR\fR +.ad +.RS 13n +.rt +The largest finite single-precision number, \fBHUGE\fR of appropriate sign, is +returned, \fBerrno\fR is set to \fBEDOM\fR, and a message is printed on +standard error. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBOVERFLOW\fR\fR +.ad +.RS 13n +.rt +The largest finite single-precision number, \fBHUGE\fR of appropriate sign, is +usually returned and \fBerrno\fR is set to \fBERANGE\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBUNDERFLOW\fR\fR +.ad +.RS 13n +.rt +0.0 is returned and \fBerrno\fR is set to \fBERANGE\fR. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBTLOSS\fR\fR +.ad +.RS 13n +.rt +0.0 is returned, \fBerrno\fR is set to \fBERANGE\fR, and a message is printed +on standard error. +.RE + +.sp +.LP +In general, \fBerrno\fR is not a reliable error indicator because it can be +unexpectedly set by a function in a handler for an asynchronous signal. +.SS "SVID3 ERROR HANDLING PROCEDURES (compile with cc \e-Xt)" +.sp + +.sp +.TS +tab() box; +cw(1.29i) |cw(.81i) |cw(.79i) |cw(.87i) |cw(1.03i) |cw(.71i) +lw(1.29i) |lw(.81i) |lw(.79i) |lw(.87i) |lw(1.03i) |lw(.71i) +. +<math.h> typeDOMAINSINGOVERFLOWUNDERFLOWTLOSS +_ +\fBerrno\fREDOMEDOMERANGEERANGEERANGE +_ +IEEE ExceptionInvalid OperationDivision by ZeroOverflowUnderflow\(mi +_ +fp_exception_typefp_invalidfp_divisionfp_overflowfp_underflow\(mi +_ +ACOS, ASIN\|(|x| > 1):Md, 0.0\(mi\(mi\(mi\(mi +_ +ACOSH\|(x < 1), ATANH\|(|x| > 1):NaN\(mi\(mi\(mi\(mi +_ +ATAN2\|(0,0):Md, 0.0\(mi\(mi\(mi\(mi +_ +COSH, SINH:\(mi\(mi\(+-HUGE\(mi\(mi +_ +EXP:\(mi\(mi+HUGE0.0\(mi +_ +FMOD\|(x,0):x\(mi\(mi\(mi\(mi +_ +HYPOT:\(mi\(mi+HUGE\(mi\(mi +_ +J0, J1, JN\|(|x| > X_TLOSS):\(mi\(mi\(mi\(miMt, 0.0 +_ +LGAMMA: + usual cases\(mi\(mi+HUGE\(mi\(mi + (x = 0 or \(miinteger) \(miMs, +HUGE\(mi\(mi\(mi +_ +LOG, LOG10: + (x < 0)Md, \(miHUGE\(mi \(mi\(mi\(mi + (x = 0)\(miMs, \(miHUGE\(mi\(mi\(mi +_ +POW: + usual cases\(mi\(mi\(+-HUGE\(+-0.0\(mi + (x < 0) ** (y not an integer)Md, 0.0\(mi\(mi\(mi\(mi + 0 ** 0Md, 0.0\(mi\(mi\(mi\(mi + 0 ** (y < 0)Md, 0.0\(mi\(mi\(mi +_ +REMAINDER\|(x,0):NaN\(mi\(mi\(mi\(mi +_ +SCALB:\(mi\(mi\(+-HUGE_VAL\(+-0.0\(mi +_ +SQRT\|(x < 0):Md, 0.0\(mi\(mi\(mi\(mi +_ +Y0, Y1, YN: + (x < 0)Md, \(miHUGE\(mi\(mi\(mi\(mi + (x = 0)\(miMd, \(miHUGE\(mi\(mi\(mi + (x > X_TLOSS)\(mi\(mi\(mi\(miMt, 0.0 +.TE + +.SS "Abbreviations" +.sp +.ne 2 +.mk +.na +\fBMd\fR +.ad +.RS 12n +.rt +Message is printed (DOMAIN error). +.RE + +.sp +.ne 2 +.mk +.na +\fBMs\fR +.ad +.RS 12n +.rt +Message is printed (SING error). +.RE + +.sp +.ne 2 +.mk +.na +\fBMt\fR +.ad +.RS 12n +.rt +Message is printed (TLOSS error). +.RE + +.sp +.ne 2 +.mk +.na +\fBNaN\fR +.ad +.RS 12n +.rt +IEEE NaN result and invalid operation exception. +.RE + +.sp +.ne 2 +.mk +.na +\fBHUGE\fR +.ad +.RS 12n +.rt +Maximum finite single-precision floating-point number. +.RE + +.sp +.ne 2 +.mk +.na +\fBHUGE_VAL\fR +.ad +.RS 12n +.rt +IEEE \(if result and division-by-zero exception. +.RE + +.sp +.ne 2 +.mk +.na +\fBX_TLOSS\fR +.ad +.RS 12n +.rt +The value X_TLOSS is defined in <values.h>. +.RE + +.sp +.LP +The interaction of IEEE arithmetic and \fBmatherr()\fR is not defined when +executing under IEEE rounding modes other than the default round to nearest: +\fBmatherr()\fR is not always called on overflow or underflow and can return +results that differ from those in this table. +.SH X/OPEN COMMON APPLICATION ENVIRONMENT (CAE) SPECIFICATIONS CONFORMANCE +.sp +.LP +The X/Open System Interfaces and Headers (XSH) Issue 3 and later revisions of +that specification no longer sanctions the use of the \fBmatherr\fR interface. +The following table summarizes the values returned in the exceptional cases. +In general, XSH dictates that as long as one of the input argument(s) is a NaN, +NaN is returned. In particular, \fBpow(NaN,0)\fR = NaN. +.SS "CAE SPECIFICATION ERROR HANDLING PROCEDURES (compile with cc \fB-Xa\fR)" +.sp + +.sp +.TS +tab() box; +cw(.82i) |cw(1.03i) |cw(1i) |cw(.97i) |cw(.96i) |cw(.72i) +lw(.82i) |lw(1.03i) |lw(1i) |lw(.97i) |lw(.96i) |lw(.72i) +. +<math.h> typeDOMAINSINGOVERFLOWUNDERFLOWTLOSS +_ +\fBerrno\fREDOMEDOMERANGEERANGEERANGE +_ +ACOS, ASIN\|(|x| > 1):0.0\(mi\(mi\(mi\(mi +_ +ATAN2\|(0,0):0.0\(mi\(mi\(mi\(mi +_ +COSH, SINH:\(mi\(mi{\(+-HUGE_VAL}\(mi\(mi +_ +EXP:\(mi\(mi{+HUGE_VAL}{0.0}\(mi +_ +FMOD\|(x,0):{NaN}\(mi\(mi\(mi\(mi +_ +HYPOT:\(mi\(mi{+HUGE_VAL}\(mi\(mi +_ +J0, J1, JN\|(|x| > X_TLOSS):\(mi\(mi\(mi\(mi{0.0} +_ +LGAMMA: + usual cases\(mi\(mi{+HUGE_VAL}\(mi\(mi + (x = 0 or \(miinteger) \(mi+HUGE_VAL\(mi\(mi\(mi +_ +LOG, LOG10: + (x < 0)\fB-HUGE_VAL\fR\(mi\(mi\(mi\(mi + (x = 0)\(mi\fB-HUGE_VAL\fR\(mi\(mi\(mi +_ +POW: + usual cases\(mi\(mi\(+-HUGE_VAL\(+-0.0\(mi + (x < 0) ** (y not an integer)0.0\(mi\(mi\(mi\(mi + 0 ** 0{1.0}\(mi\(mi\(mi\(mi + 0 ** (y < 0){\fB-HUGE_VAL\fR}\(mi\(mi\(mi\(mi +_ +SQRT\|(x < 0):0.0\(mi\(mi\(mi\(mi +_ +Y0, Y1, YN: + (x < 0){\fB-HUGE_VAL\fR}\(mi\(mi\(mi\(mi + (x = 0)\(mi{\fB-HUGE_VAL\fR}\(mi\(mi\(mi + (x > X_TLOSS)\(mi\(mi\(mi\(mi0.0 +.TE + +.SS "Abbreviations" +.sp +.ne 2 +.mk +.na +\fB{...}\fR +.ad +.RS 12n +.rt +\fBerrno\fR is not to be relied upon in all braced cases. +.RE + +.sp +.ne 2 +.mk +.na +\fBNaN\fR +.ad +.RS 12n +.rt +IEEE NaN result and invalid operation exception. +.RE + +.sp +.ne 2 +.mk +.na +\fBHUGE_VAL\fR +.ad +.RS 12n +.rt +IEEE \(if result and division-by-zero exception. +.RE + +.sp +.ne 2 +.mk +.na +\fBX_TLOSS\fR +.ad +.RS 12n +.rt +The value X_TLOSS is defined in <\fBvalues.h\fR>. +.RE + +.SH ANSI/ISO-C STANDARD CONFORMANCE +.sp +.LP +The ANSI/ISO-C standard covers a small subset of the CAE specification. +.sp +.LP +The following table summarizes the values returned in the exceptional cases. +.SS "ANSI/ISO-C ERROR HANDLING PROCEDURES (compile with cc \fB-Xc\fR)" +.sp + +.sp +.TS +tab() box; +cw(1.1i) |cw(1.1i) |cw(1.1i) |cw(1.1i) |cw(1.11i) +lw(1.1i) |lw(1.1i) |lw(1.1i) |lw(1.1i) |lw(1.11i) +. +<math.h> typeDOMAINSINGOVERFLOWUNDERFLOW +_ +\fBerrno\fREDOMEDOMERANGEERANGE +_ +ACOS, ASIN\|(|x| > 1):0.0\(mi\(mi\(mi +_ +ATAN2\|(0,0):0.0\(mi\(mi\(mi +_ +EXP:\(mi\(mi+HUGE_VAL0.0 +_ +FMOD\|(x,0):NaN\(mi\(mi\(mi +_ +LOG, LOG10: + (x < 0)\fB-HUGE_VAL\fR\(mi\(mi\(mi + (x = 0)\(mi\fB-HUGE_VAL\fR\(mi\(mi +_ +POW: + usual cases\(mi\(mi\(+-HUGE_VAL\(+-0.0 + (x < 0) ** (y not an integer)0.0\(mi\(mi\(mi + 0 ** (y < 0)\fB-HUGE_VAL\fR\(mi\(mi\(mi +_ +SQRT\|(x < 0):0.0\(mi\(mi\(mi +.TE + +.SS "ABBREVIATIONS" +.sp +.ne 2 +.mk +.na +\fBNaN\fR +.ad +.RS 12n +.rt +IEEE NaN result and invalid operation exception. +.RE + +.sp +.ne 2 +.mk +.na +\fBHUGE_VAL\fR +.ad +.RS 12n +.rt +IEEE \(if result and division-by-zero. +.RE + +.SH EXAMPLES +.LP +\fBExample 1 \fRExample of \fBmatherr()\fR function +.sp +.in +2 +.nf +#include <stdio.h> +#include <stdlib.h> +#include <math.h> + +int +matherr(struct exception *x) { + switch (x\(mi>type) { + case DOMAIN: + /* change sqrt to return sqrt(\(miarg1), not NaN */ + if (!strcmp(x\(mi>name, "sqrt")) { + x\(mi>retval = sqrt(\(mix\(mi>arg1); + return (0); /* print message and set errno */ + } /* FALLTHRU */ + case SING: + /* all other domain or sing exceptions, print message and */ + /* abort */ + fprintf(stderr, "domain exception in %s\en", x\(mi>name); + abort( ); + break; + } + return (0); /* all other exceptions, execute default procedure */ + } +.fi +.in -2 + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/modf.3m b/usr/src/man/man3m/modf.3m new file mode 100644 index 0000000000..7cb6c935a5 --- /dev/null +++ b/usr/src/man/man3m/modf.3m @@ -0,0 +1,92 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH modf 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +modf, modff, modfl \- decompose floating-point number +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBmodf\fR(\fBdouble\fR \fIx\fR, \fBdouble *\fR\fIiptr\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBmodff\fR(\fBfloat\fR \fIx\fR, \fBfloat *\fR\fIiptr\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBmodfl\fR(\fBlong double\fR \fIx\fR, \fBlong double *\fR\fIiptr\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions break the argument \fIx\fR into integral and fractional parts, +each of which has the same sign as the argument. It stores the integral part as +a \fBdouble\fR for the \fBmodf()\fR function, a float for the \fBmodff()\fR +function, or a long double for the\fBmodfl()\fR function in the object pointed +to by \fIiptr\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the signed fractional part +of \fIx\fR. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned and *\fIiptr\fR is set to NaN. +.sp +.LP +If \fIx\fR is \(+-Inf, \(+-0 is returned and *\fIiptr\fR is set to \(+-Inf. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH USAGE +.sp +.LP +These functions compute the function result and *\fIiptr\fR such that: +.sp +.in +2 +.nf +a = modf(x, &iptr) ; +x == a+*iptr ; +.fi +.in -2 + +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfrexp\fR(3M), \fBisnan\fR(3M), \fBldexp\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/nan.3m b/usr/src/man/man3m/nan.3m new file mode 100644 index 0000000000..ee987b7256 --- /dev/null +++ b/usr/src/man/man3m/nan.3m @@ -0,0 +1,100 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH nan 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +nan, nanf, nanl \- return quiet NaN +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBnan\fR(\fBconst char *\fR\fItagp\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBnanf\fR(\fBconst char *\fR\fItagp\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBnanl\fR(\fBconst char *\fR\fItagp\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The function call \fBnan\fR("\fIn\fR-char-sequence") is equivalent to: +.sp +.in +2 +.nf +strtod("NAN(n-char-sequence)", (char **) NULL); +.fi +.in -2 + +.sp +.LP +The function call \fBnan\fR(" ") is equivalent to: +.sp +.in +2 +.nf +strtod("NAN()", (char **) NULL) +.fi +.in -2 + +.sp +.LP +If \fItagp\fR does not point to an \fIn\fR-char sequence or an empty string, +the function call is equivalent to: +.sp +.in +2 +.nf +strtod("NAN", (char **) NULL) +.fi +.in -2 + +.sp +.LP +Function calls to \fBnanf()\fR and \fBnanl()\fR are equivalent to the +corresponding function calls to \fBstrtof()\fR and \fBstrtold()\fR. See +\fBstrtod\fR(3C). +.SH RETURN VALUES +.sp +.LP +These functions return a quiet NaN. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBmath.h\fR(3HEAD), \fBstrtod\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/nearbyint.3m b/usr/src/man/man3m/nearbyint.3m new file mode 100644 index 0000000000..7b11612955 --- /dev/null +++ b/usr/src/man/man3m/nearbyint.3m @@ -0,0 +1,75 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH nearbyint 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +nearbyint, nearbyintf, nearbyintl \- floating-point rounding functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBnearbyint\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBnearbyintf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBnearbyintl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions round their argument to an integer value in floating-point +format, using the current rounding direction and without raising the inexact +floating-point exception. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the rounded integer value. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, \(+-0 is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, \fIx\fR is returned. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/nextafter.3m b/usr/src/man/man3m/nextafter.3m new file mode 100644 index 0000000000..c054c4d3c3 --- /dev/null +++ b/usr/src/man/man3m/nextafter.3m @@ -0,0 +1,160 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH nextafter 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \- next +representable double-precision floating-point number +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBnextafter\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBnextafterf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBnextafterl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.LP +.nf +\fBdouble\fR \fBnexttoward\fR(\fBdouble\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBnexttowardf\fR(\fBfloat\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBnexttowardl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBnextafter()\fR, \fBnextafterf()\fR, and \fBnextafterl()\fR functions +compute the next representable floating-point value following \fIx\fR in the +direction of \fIy\fR. Thus, if \fIy\fR is less than \fIx\fR, \fBnextafter()\fR +returns the largest representable floating-point number less than \fIx\fR. The +\fBnextafter()\fR, \fBnextafterf()\fR, and \fBnextafterl()\fR functions return +\fIy\fR if \fIx\fR equals \fIy\fR. +.sp +.LP +The \fBnexttoward()\fR, \fBnexttowardf()\fR, and \fBnexttowardl()\fR functions +are equivalent to the corresponding \fBnextafter()\fR functions, except that +the second parameter has type \fBlong double\fR and the functions return +\fIy\fR converted to the type of the function if \fIx\fR equals \fIy\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the next representable +floating-point value following \fIx\fR in the direction of \fIy\fR. +.sp +.LP +If \fIx\fR == \fIy\fR, \fIy\fR (of the type \fIx\fR) is returned. +.sp +.LP +If \fIx\fR is finite and the correct function value would overflow, a range +error occurs and \(+-\fBHUGE_VAL\fR, \(+-\fBHUGE_VALF\fR, and +\(+-\fBHUGE_VALL\fR (with the same sign as \fIx\fR) is returned as appropriate +for the return type of the function. +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR != \fIy\fR and the correct function value is subnormal, zero, or +underflows, a range error occurs and either the correct function value (if +representable) or 0.0 is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The correct value overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception is raised. +.sp +The \fBnextafter()\fR function sets \fBerrno\fR to \fBERANGE\fR if the correct +value would overflow. +.RE + +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The correct value underflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the underflow floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBnextafter()\fR. +On return, if \fBerrno\fR is non-zero, an error has occurred. The +\fBnextafterf()\fR, \fBnextafterl()\fR. \fBnexttoward()\fR, +\fBnexttowardf()\fR, and \fBnexttowardl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/pow.3m b/usr/src/man/man3m/pow.3m new file mode 100644 index 0000000000..78f49df142 --- /dev/null +++ b/usr/src/man/man3m/pow.3m @@ -0,0 +1,244 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH pow 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +pow, powf, powl \- power function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBpow\fR(\fBdouble\fR x, \fBdouble\fR y); +.fi + +.LP +.nf +\fBfloat\fR \fBpowf\fR(\fBfloat\fR x, \fBfloat\fR y); +.fi + +.LP +.nf +\fBlong double\fR \fBpowl\fR(\fBlong double\fR x, \fBlong double\fR y); +.fi + +.LP +.nf +cc [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBpow\fR(\fBdouble\fR x, \fBdouble\fR y); +.fi + +.LP +.nf +\fBfloat\fR \fBpowf\fR(\fBfloat\fR x, \fBfloat\fR y); +.fi + +.LP +.nf +\fBlong double\fR \fBpowl\fR(\fBlong double\fR x, \fBlong double\fR y); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the value of \fIx\fR raised to the power \fIy,\fR +\fIx\fR^y>. If \fIx\fR is negative, \fIy\fR must be an integer value. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the value of \fIx\fR raised +to the power \fIy\fR. +.sp +.LP +For finite values of \fIx\fR < 0, and finite non-integer values of \fIy\fR, a +domain error occurs and either a NaN (if representable), or an +implementation-defined value is returned. +.sp +.LP +If the correct value would cause overflow, a range error occurs and +\fBpow()\fR, \fBpowf()\fR, and \fBpowl()\fR return \fBHUGE_VAL\fR, +\fBHUGE_VALF\fR, and \fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR or \fIy\fR is a NaN, a NaN is returned unless: +.RS +4 +.TP +.ie t \(bu +.el o +If \fIx\fR is +1 and \fIy\fR is NaN and the application was compiled with the +\fBc99\fR compiler driver and is therefore SUSv3-conforming (see +\fBstandards\fR(5)), 1.0 is returned. +.RE +.RS +4 +.TP +.ie t \(bu +.el o +For any value of \fIx\fR (including NaN), if \fIy\fR is +0, 1.0 is returned. +.RE +.sp +.LP +For any odd integer value of \fIy\fR > 0, if \fIx\fR is \(+-0, \(+-0 is +returned. +.sp +.LP +For \fIy\fR > 0 and not an odd integer, if \fIx\fR is \(+-0, +0 is returned. +.sp +.LP +If \fIx\fR is \(+-1 and \fIy\fR is \(+-Inf, and the application was compiled +with the \fBcc\fR compiler driver, NaN is returned. If, however, the +application was compiled with the \fBc99\fR compiler driver and is therefore +SUSv3-conforming (see\fBstandards\fR(5)), 1.0 is returned. +.sp +.LP +For |\fIx\fR| < 1, if \fIy\fR is \(miInf, +Inf is returned. +.sp +.LP +For |\fIx\fR| > 1, if \fIy\fR is \(miInf, +0 is returned. +.sp +.LP +For |\fIx\fR| < 1, if \fIy\fR is +Inf, +0 is returned. +.sp +.LP +For |\fIx\fR| > 1, if \fIy\fR is +Inf, +Inf is returned. +.sp +.LP +For \fIy\fR an odd integer < 0, if \fIx\fR is \(miInf, \(mi0 is returned. +.sp +.LP +For \fIy\fR < 0 and not an odd integer, if \fIx\fR is \(miInf, +0 is returned. +.sp +.LP +For \fIy\fR an odd integer > 0, if \fIx\fR is \(miInf, \(miInf is returned. +.sp +.LP +For \fIy\fR > 0 and not an odd integer, if \fIx\fR is \(miInf, +Inf is +returned. +.sp +.LP +For \fIy\fR < 0, if \fIx\fR is +Inf, +0 is returned. +.sp +.LP +For \fIy\fR > 0, if \fIx\fR is +Inf, +Inf is returned. +.sp +.LP +For \fIy\fR an odd integer < 0, if \fIx\fR is \(+-0, a pole error occurs and +\(+-\fBHUGE_VAL\fR, \(+-\fBHUGE_VALF\fR, and \(+-\fBHUGE_VALL\fR are returned +for \fBpow()\fR, \fBpowf()\fR, and \fBpowl()\fR, respectively. +.sp +.LP +For \fIy\fR < 0 and not an odd integer, if \fIx\fR is \(+-0, a pole error +occurs and \fBHUGE_VAL\fR, \fBHUGE_VALF\fR, and \fBHUGE_VALL\fR are returned +for \fBpow()\fR, \fBpowf()\fR, and \fBpowl()\fR, respectively. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBpow()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is negative and \fIy\fR is a finite non-integer. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBpow()\fR function sets \fBerrno\fR to \fBEDOM\fR if the value of \fIx\fR +is negative and \fIy\fR is non-integral. +.RE + +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is 0 and \fIy\fR is negative. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the divide-by-zero floating-point exception is raised. +.RE + +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 16n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception is raised. +.sp +The \fBpow()\fR function sets \fBerrno\fR to \fBEDOM\fR if the value to be +returned would cause overflow. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBpow()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBpowf()\fR and +\fBpowl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBexp\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBattributes\fR(5), +\fBstandards\fR(5) +.SH NOTES +.sp +.LP +Prior to Solaris 2.6, there was a conflict between the \fBpow()\fR function in +this library and the \fBpow()\fR function in the \fBlibmp\fR library. This +conflict was resolved by prepending \fBmp_\fR to all functions in the +\fBlibmp\fR library. See \fBmp\fR(3MP) for more information. diff --git a/usr/src/man/man3m/remainder.3m b/usr/src/man/man3m/remainder.3m new file mode 100644 index 0000000000..567ebd81a9 --- /dev/null +++ b/usr/src/man/man3m/remainder.3m @@ -0,0 +1,108 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH remainder 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +remainder, remainderf, remainderl \- remainder function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBremainder\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBremainderf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBremainderl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions return the floating point remainder \fIr\fR = \fIx\fR \(mi +\fIn\fR\fIy\fR when \fIy\fR is non-zero. The value \fIn\fR is the integral +value nearest the exact value \fIx\fR/\fIy\fR. When |\fIn\fR \(mi +\fIx\fR/\fIy\fR\|| = \(12, the value \fIn\fR is chosen to be even. +.sp +.LP +The behavior of \fBremainder()\fR is independent of the rounding mode. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the floating point remainder +\fIr\fR = \fIx\fR \(mi \fIn\fR\fIy\fR when \fIy\fR is non-zero. +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is infinite or \fIy\fR is 0 and the other is non-NaN, a domain error +occurs and a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is \(+-Inf, or the \fIy\fR argument is \(+-0 and the other +argument is non-NaN. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.sp +The \fBremainder()\fR function sets \fBerrno\fR to \fBEDOM\fR if \fIy\fR +argument is 0 or the \fIx\fR argument is positive or negative infinity. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for error situations can set \fBerrno\fR to 0 +before calling \fBremainder()\fR. On return, if \fBerrno\fR is non-zero, an +error has occurred. The \fBremainderf()\fR and \fBremainderl()\fR functions do +not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBabs\fR(3C), \fBdiv\fR(3C), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/remquo.3m b/usr/src/man/man3m/remquo.3m new file mode 100644 index 0000000000..cc2e10ee28 --- /dev/null +++ b/usr/src/man/man3m/remquo.3m @@ -0,0 +1,105 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH remquo 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +remquo, remquof, remquol \- remainder functions +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBremquo\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIy\fR, \fBint *\fR\fIquo\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBremquof\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIy\fR, \fBint *\fR\fIquo\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBremquol\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIy\fR, \fBint *\fR\fIquo\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBremquo()\fR, \fBremquof()\fR, and \fBremquol()\fR functions compute the +same remainder as the \fBremainder()\fR, \fBremainderf()\fR, and +\fBremainderl()\fR functions, respectively. See \fBremainder\fR(3M). In the +object pointed to by \fIquo\fR, they store a value whose sign is the sign of +\fIx\fR/\fIy\fR and whose magnitude is congruent modulo 2^\fIn\fR to the +magnitude of the integral quotient of \fIx\fR/\fIy\fR, where \fIn\fR is an +integer greater than or equal to 3. +.SH RETURN VALUES +.sp +.LP +These functions return \fIx\fR REM \fIy\fR. +.sp +.LP +If \fIx\fR or \fIy\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-Inf or \fIy\fR is 0 and the other argument is non-NaN, a +domain error occurs and a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is Inf or the \fIy\fR argument is 0 and the other argument +is non-NaN. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBmath.h\fR(3HEAD), +\fBremainder\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/rint.3m b/usr/src/man/man3m/rint.3m new file mode 100644 index 0000000000..f21200513d --- /dev/null +++ b/usr/src/man/man3m/rint.3m @@ -0,0 +1,85 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH rint 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +rint, rintf, rintl \- round-to-nearest integral value +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBrint\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBrintf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBrintl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions return the integral value (represented as a \fBdouble\fR) +nearest \fIx\fR in the direction of the current rounding mode. +.sp +.LP +If the current rounding mode rounds toward negative infinity, \fBrint()\fR is +equivalent to \fBfloor\fR(3M). If the current rounding mode rounds toward +positive infinity, \fBrint()\fR is equivalent to \fBceil\fR(3M). +.sp +.LP +These functions differ from the \fBnearbyint\fR(3M), \fBnearbyintf()\fR, and +\fBnearbyintl()\fR functions only in that they might raise the inexact +floating-point exception if the result differs in value from the argument. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the integer (represented as +a double precision number) nearest \fIx\fR in the direction of the current +rounding mode. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+-Inf, \fIx\fR is returned. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBabs\fR(3C), \fBceil\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBfloor\fR(3M), \fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBnearbyint\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/round.3m b/usr/src/man/man3m/round.3m new file mode 100644 index 0000000000..8d2b246aa4 --- /dev/null +++ b/usr/src/man/man3m/round.3m @@ -0,0 +1,73 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH round 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +round, roundf, roundl \- round to nearest integer value in floating-point +format +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBround\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBroundf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBroundl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions round their argument to the nearest integer value in +floating-point format, rounding halfway cases away from 0, regardless of the +current rounding direction. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the rounded integer value. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+- Inf, \fIx\fR is returned. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBmath.h\fR(3HEAD), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/scalb.3m b/usr/src/man/man3m/scalb.3m new file mode 100644 index 0000000000..f38893a5dc --- /dev/null +++ b/usr/src/man/man3m/scalb.3m @@ -0,0 +1,144 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH scalb 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +scalb, scalbf, scalbl \- load exponent of a radix-independent floating-point +number +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBscalb\fR(\fBdouble\fR \fIx\fR, \fBdouble\fR \fIn\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBscalbf\fR(\fBfloat\fR \fIx\fR, \fBfloat\fR \fIn\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBscalbl\fR(\fBlong double\fR \fIx\fR, \fBlong double\fR \fIn\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute x * \fIr\fR^n, where \fIr\fR is the radix of the +machine's floating point arithmetic. When \fIr\fR is 2, \fBscalb()\fR is +equivalent to \fBldexp\fR(3M). The value of \fIr\fR is \fBFLT_RADIX\fR which is +defined in <\fBfloat.h\fR>. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, the \fBscalb()\fR function returns \fIx\fR * +\fIr\fR^n. +.sp +.LP +If \fIx\fR or \fIn\fR is NaN, a NaN is returned. +.sp +.LP +If \fIn\fR is 0, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(+-Inf and \fIn\fR is not \(miInf, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(+-0 and \fIn\fR is not +Inf, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(+-0 and \fIn\fR is +Inf, a domain error occurs and a NaN is +returned. +.sp +.LP +If \fIx\fR is \(+-Inf and \fIn\fR is \(miInf, a domain error occurs and a NaN +is returned. +.sp +.LP +If the result would cause an overflow, a range error occurs and +\(+-\fBHUGE_VAL\fR (according to the sign of \fIx\fR) is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBscalb()\fR as specified by SVID3 and XPG3. See \fBstandards\fR(5). +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +If \fIx\fR is 0 and \fIn\fR is +Inf, or \fIx\fR is Inf and \fIn\fR is \(miInf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.RE + +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 16n +.rt +The result would overflow. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the overflow floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilitySee below. +_ +MT-LevelMT-Safe +.TE + +.sp +.LP +The \fBscalb()\fR function is Standard. The \fBscalbf()\fR and \fBscalbl()\fR +functions are Stable. +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBilogb\fR(3M), +\fBldexp\fR(3M), \fBlogb\fR(3M), \fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), +\fBscalbln\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/scalbln.3m b/usr/src/man/man3m/scalbln.3m new file mode 100644 index 0000000000..a04b34abdd --- /dev/null +++ b/usr/src/man/man3m/scalbln.3m @@ -0,0 +1,124 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH scalbln 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +scalbln, scalblnf, scalblnl, scalbn, scalbnf, scalbnl \- compute exponent using +FLT_RADIX +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBscalbln\fR(\fBdouble\fR \fIx\fR, \fBlong\fR \fIn\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBscalblnf\fR(\fBfloat\fR \fIx\fR, \fBlong\fR \fIn\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBscalblnl\fR(\fBlong double\fR \fIx\fR, \fBlong\fR \fIn\fR); +.fi + +.LP +.nf +\fBdouble\fR \fBscalbn\fR(\fBdouble\fR \fIx\fR, \fBint\fR \fIn\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBscalbnf\fR(\fBfloat\fR \fIx\fR, \fBint\fR \fIn\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBscalbnl\fR(\fBlong double\fR \fIx\fR, \fBint\fR \fIn\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute \fIx\fR * \fBFLT_RADIX\fR^n efficiently, not normally +by computing \fBFLT_RADIX\fR^n explicitly. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return \fIx\fR * +\fBFLT_RADIX\fR^\fIn\fR>. +.sp +.LP +If the result would cause overflow, a range error occurs and these functions +return \(+-\fBHUGE_VAL\fR, \(+-\fBHUGE_VALF\fR, and \(+-\fBHUGE_VALL\fR +(according to the sign of \fIx\fR) as appropriate for the return type of the +function. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+-Inf, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is 0, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the overflow floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBmath.h\fR(3HEAD), +\fBscalb\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/signbit.3m b/usr/src/man/man3m/signbit.3m new file mode 100644 index 0000000000..4720eaf6c1 --- /dev/null +++ b/usr/src/man/man3m/signbit.3m @@ -0,0 +1,62 @@ +'\" te +.\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH signbit 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +signbit \- test sign +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBint\fR \fBsignbit\fR(\fBreal-floating\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +The \fBsignbit()\fR macro determines whether the sign of its argument value is +negative. NaNs, zeros, and infinities have a sign bit. +.SH RETURN VALUES +.sp +.LP +The \fBsignbit()\fR macro returns a non-zero value if and only if the sign of +its argument value is negative. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfpclassify\fR(3M), \fBisfinite\fR(3M), \fBisinf\fR(3M), \fBisnan\fR(3M), +\fBisnormal\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3m/significand.3m b/usr/src/man/man3m/significand.3m new file mode 100644 index 0000000000..5cfb566589 --- /dev/null +++ b/usr/src/man/man3m/significand.3m @@ -0,0 +1,71 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH significand 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +significand, significandf, significandl \- significand function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBsignificand\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBsignificandf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBsignificandl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +If \fIx\fR equals \fIsig \fR* 2^\fIn\fR with \fI1\fR\(<= \fIsig\fR < \fI2\fR, +then these functions return \fIsig\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return \fIsig\fR. +.sp +.LP +If \fIx\fR is either 0, \(+-Inf or NaN, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStable +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBlogb\fR(3M), \fBscalb\fR(3M), \fBattributes\fR(5) diff --git a/usr/src/man/man3m/sin.3m b/usr/src/man/man3m/sin.3m new file mode 100644 index 0000000000..938a8da3e4 --- /dev/null +++ b/usr/src/man/man3m/sin.3m @@ -0,0 +1,101 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sin 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +sin, sinf, sinl \- sine function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBsin\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBsinf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBsinl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the sine of its argument \fIx\fR, measured in radians. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the sine of \fIx\fR. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, a domain error occurs and a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The \fIx\fR argument is \(+-Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBasin\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/sincos.3m b/usr/src/man/man3m/sincos.3m new file mode 100644 index 0000000000..00ad44b957 --- /dev/null +++ b/usr/src/man/man3m/sincos.3m @@ -0,0 +1,60 @@ +'\" te +.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sincos 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +sincos, sincosf, sincosl \- combined sine and cosine function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBvoid\fR \fBsincos\fR(\fBdouble\fR \fIx\fR, \fBdouble *\fR\fIs\fR, \fBdouble *\fR\fIc\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBsincosf\fR(\fBfloat\fR \fIx\fR, \fBfloat *\fR\fIs\fR, \fBfloat *\fR\fIc\fR); +.fi + +.LP +.nf +\fBvoid\fR \fBsincosl\fR(\fBlong double\fR \fIx\fR, \fBlong double *\fR\fIs\fR, \fBlong double *\fR\fIc\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the sine and cosine of the first argument \fIx\fR, +measured in radians. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the sine of \fIx\fR in +*\fIs\fR and cosine of \fIx\fR in *\fIc\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStable +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBcos\fR(3M), \fBsin\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5) diff --git a/usr/src/man/man3m/sinh.3m b/usr/src/man/man3m/sinh.3m new file mode 100644 index 0000000000..fb63ffc2c4 --- /dev/null +++ b/usr/src/man/man3m/sinh.3m @@ -0,0 +1,117 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH sinh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +sinh, sinhf, sinhl \- hyperbolic sine function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBsinh\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBsinhf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBsinhl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the hyperbolic sine of \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the hyperbolic sine of +\fIx\fR. +.sp +.LP +If the result would cause an overflow, a range error occurs and +\(+-\fBHUGE_VAL\fR, \(+-\fBHUGE_VALF\fR, and \(+-\fBHUGE_VALL\fR (with the same +sign as \fIx\fR) is returned as appropriate for the type of the function. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+-Inf, \fIx\fR is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned by +\fBacos()\fR as specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 15n +.rt +The result would cause an overflow. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the overflow floating-point exception is raised. +.sp +The \fBasinh()\fR function sets \fBerrno\fR to \fBERANGE\fR if the result would +cause an overflow. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBasinh()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBasinhf()\fR +and \fBasinhl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBasinh\fR(3M), \fBcosh\fR(3M), \fBfeclearexcept\fR(3M), +\fBfetestexcept\fR(3M), \fBisnan\fR(3M), \fBmath.h\fR(3HEAD), +\fBmatherr\fR(3M), \fBtanh\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/sqrt.3m b/usr/src/man/man3m/sqrt.3m new file mode 100644 index 0000000000..0bdea2d4e1 --- /dev/null +++ b/usr/src/man/man3m/sqrt.3m @@ -0,0 +1,111 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Copyright (c) 1985 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.TH sqrt 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +sqrt, sqrtf, sqrtl \- square root function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBsqrt\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBsqrtf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBsqrtl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the square root of their argument \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the square root of \fIx\fR. +.sp +.LP +For finite values of \fIx\fR < \(mi0, a domain error occurs and either a NaN +(if supported) or an implementation-defined value is returned. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or +Inf, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(miInf, a domain error occurs and a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The finite value of \fIx\fR is < \(mi0 or \fIx\fR is \(miInf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.sp +The \fBsqrt()\fR function sets \fBerrno\fR to \fBEDOM\fR if the value of +\fIx\fR is negative. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.sp +.LP +An application can also set \fBerrno\fR to 0 before calling \fBsqrt()\fR. On +return, if \fBerrno\fR is non-zero, an error has occurred. The \fBsqrtf()\fR +and \fBsqrtl()\fR functions do not set \fBerrno\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBisnan\fR(3M), +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/tan.3m b/usr/src/man/man3m/tan.3m new file mode 100644 index 0000000000..ec4abcac2a --- /dev/null +++ b/usr/src/man/man3m/tan.3m @@ -0,0 +1,106 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH tan 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +tan, tanf, tanl \- tangent function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBtan\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBtanf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBtanl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the tangent of their argument \fIx\fR, measured in +radians. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the tangent of \fIx\fR. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, a domain error occurs and a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is \(+-Inf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, the invalid floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +There are no known floating-point representations such that for a normal +argument, \fBtan\fR(\fIx\fR) is either overflow or underflow. +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBatan\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), +\fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/tanh.3m b/usr/src/man/man3m/tanh.3m new file mode 100644 index 0000000000..d82cb1d437 --- /dev/null +++ b/usr/src/man/man3m/tanh.3m @@ -0,0 +1,79 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH tanh 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +tanh, tanhf, tanhl \- hyperbolic tangent function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBtanh\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBtanhf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBtanhl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the hyperbolic tangent of their argument \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the hyperbolic tangent of +\fIx\fR. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0, \fIx\fR is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, \(+-1 is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBatanh\fR(3M), \fBisnan\fR(3M), \fBmath.h\fR(3HEAD), \fBtan\fR(3M), +\fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/tgamma.3m b/usr/src/man/man3m/tgamma.3m new file mode 100644 index 0000000000..86b6ca38f5 --- /dev/null +++ b/usr/src/man/man3m/tgamma.3m @@ -0,0 +1,142 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH tgamma 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +tgamma, tgammaf, tgammal \- compute gamma function +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBtgamma\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBtgammaf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBtgammal\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute the \fBgamma()\fR function of \fIx\fR. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return \fBgamma\fR(\fIx\fR). +.sp +.LP +If \fIx\fR is a negative integer, a domain error occurs and a NaN is returned. +.sp +.LP +If the correct value would cause overflow, a range error occurs and +\fBtgamma()\fR, \fBtgammaf()\fR, and \fBtgammal()\fR return the value of the +macro \(+-\fBHUGE_VAL\fR, \(+-\fBHUGE_VALF\fR, or \(+-\fBHUGE_VALL\fR, +respectively. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-Inf, \fIx\fR is returned. +.sp +.LP +If x is \(+-0, a pole error occurs and \fBtgamma()\fR, \fBtgammaf()\fR, and +\fBtgammal()\fR return \(+-\fBHUGE_VAL\fR, \(+-\fBHUGE_VALF\fR, and +\(+-\fBHUGE_VALL\fR, respectively. +.sp +.LP +If \fIx\fR is +Inf, a domain error occurs and a NaN is returned. +.SH ERRORS +.sp +.LP +These functions will fail if: +.sp +.ne 2 +.mk +.na +\fBDomain Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is a negative integer or \fIx\fR is \(miInf. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the invalid floating-point exception is raised. +.RE + +.sp +.ne 2 +.mk +.na +\fBPole Error\fR +.ad +.RS 16n +.rt +The value of \fIx\fR is zero. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the divide-by-zero floating-point exception is raised. +.RE + +.sp +.ne 2 +.mk +.na +\fBRange Error\fR +.ad +.RS 16n +.rt +The value overflows. +.sp +If the integer expression (\fBmath_errhandling\fR & \fBMATH_ERREXCEPT\fR) is +non-zero, then the overflow floating-point exception is raised. +.RE + +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBlgamma\fR(3M), +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/trunc.3m b/usr/src/man/man3m/trunc.3m new file mode 100644 index 0000000000..ce03d545e5 --- /dev/null +++ b/usr/src/man/man3m/trunc.3m @@ -0,0 +1,74 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH trunc 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +trunc, truncf, truncl \- round to truncated integer value +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBtrunc\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBtruncf\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBtruncl\fR(\fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions round their argument to the integer value, in floating format, +nearest to but no larger in magnitude than the argument. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the truncated integer value. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is \(+-0 or \(+-Inf, \fIx\fR is returned. +.SH ERRORS +.sp +.LP +No errors are defined. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStandard +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBmath.h\fR(3HEAD), \fBattributes\fR(5), \fBstandards\fR(5) diff --git a/usr/src/man/man3m/y0.3m b/usr/src/man/man3m/y0.3m new file mode 100644 index 0000000000..3e8a66ab71 --- /dev/null +++ b/usr/src/man/man3m/y0.3m @@ -0,0 +1,131 @@ +'\" te +.\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. +.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. +.\" Portions Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at +.\" http://www.opengroup.org/bookstore/. +.\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. +.\" This notice shall appear on any product containing this material. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH y0 3M "12 Jul 2006" "SunOS 5.11" "Mathematical Library Functions" +.SH NAME +y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \- Bessel functions of the second kind +.SH SYNOPSIS +.LP +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +#include <math.h> + +\fBdouble\fR \fBy0\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBy0f\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBy0l\fR(\fBlong double\fR \fIx\fR); +.fi + +.LP +.nf +\fBdouble\fR \fBy1\fR(\fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBy1f\fR(\fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBy1l\fR(\fBlong double\fR \fIx\fR); +.fi + +.LP +.nf +\fBdouble\fR \fByn\fR(\fBint\fR \fIn\fR, \fBdouble\fR \fIx\fR); +.fi + +.LP +.nf +\fBfloat\fR \fBynf\fR(\fBint\fR \fIn\fR, \fBfloat\fR \fIx\fR); +.fi + +.LP +.nf +\fBlong double\fR \fBynl\fR(\fBint\fR \fIn\fR, \fBlong double\fR \fIx\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +These functions compute Bessel functions of \fIx\fR of the second kind of +orders 0, 1 and \fIn\fR, respectively. +.SH RETURN VALUES +.sp +.LP +Upon successful completion, these functions return the relevant Bessel value of +\fIx\fR of the second kind. +.sp +.LP +If \fIx\fR is NaN, a NaN is returned. +.sp +.LP +If \fIx\fR is negative, \(mi\fBHUGE_VAL\fR or NaN is returned. +.sp +.LP +If \fIx\fR is 0.0, \(mi\fBHUGE_VAL\fR is returned. +.sp +.LP +If the correct result would cause overflow, \(mi\fBHUGE_VAL\fR is returned. +.sp +.LP +For exceptional cases, \fBmatherr\fR(3M) tabulates the values to be returned as +specified by SVID3 and XPG3. +.SH ERRORS +.sp +.LP +No errors are returned. +.SH USAGE +.sp +.LP +An application wanting to check for exceptions should call +\fBfeclearexcept\fR(\fBFE_ALL_EXCEPT\fR) before calling these functions. On +return, if \fBfetestexcept\fR(\fBFE_INVALID\fR | \fBFE_DIVBYZERO\fR | +\fBFE_OVERFLOW\fR | \fBFE_UNDERFLOW\fR) is non-zero, an exception has been +raised. An application should either examine the return value or check the +floating point exception flags to detect exceptions. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilitySee below. +_ +MT-LevelMT-Safe +.TE + +.sp +.LP +The \fBy0()\fR, \fBy1()\fR, and \fByn()\fR functions are Standard. The +\fBy0f()\fR, \fBy0l()\fR, \fBy1f()\fR, \fBy1l()\fR, \fBynf()\fR, and +\fBynl()\fR functions are Stable. +.SH SEE ALSO +.sp +.LP +\fBisnan\fR(3M), \fBfeclearexcept\fR(3M), \fBfetestexcept\fR(3M), \fBj0\fR(3M), +\fBmath.h\fR(3HEAD), \fBmatherr\fR(3M), \fBattributes\fR(5), \fBstandards\fR(5) |