up | Inhaltsverzeichniss | Kommentar

Manual page for INTRO(3M)

intro - introduction to mathematical library functions and constants

SYNOPSIS

#include <sys/ieeefp.h>

#include <floatingpoint.h>

#include <math.h>

DESCRIPTION

The include file <math.h> contains declarations of all the functions described in Section 3M that are implemented in the math library, libm. C programs should be linked with the -lm option in order to use this library.

<sys/ieeefp.h> and <floatingpoint.h> define certain types and constants used for libm exception handling, conforming to ANSI/IEEE Std 754-1985, the IEEE Standard for Binary Floating-Point Arithmetic.

ACKNOWLEDGEMENT

The Sun version of libm is based upon and developed from ideas embodied and codes contained in 4.3 BSD, which may not be compatible with earlier BSD or UNIX implementations.

IEEE ENVIRONMENT

The IEEE Standard specifies modes for rounding direction, precision, and exception trapping, and status reflecting accrued exceptions. These modes and status constitute the IEEE run-time environment. On Sun-2 and Sun-3 systems without 68881 floating-point co-processors, only the default rounding direction to nearest is available, only the default non-stop exception handling is available, and accrued exception bits are not maintained.

IEEE EXCEPTION HANDLING

The IEEE Standard specifies exception handling for aint, ceil, floor, irint, remainder, rint, and sqrt, and suggests appropriate exception handling for fp_class, copysign, fabs, finite, fmod, isinf, isnan, ilogb, ldexp, logb, nextafter, scalb, scalbn and signbit, but does not specify exception handling for the other libm functions.

For these other unspecified functions the spirit of the IEEE Standard is generally followed in libm by handling invalid operand, singularity (division by zero), overflow, and underflow exceptions, as much as possible, in the same way they are handled for the fundamental floating-point operations such as addition and multiplication.

These unspecified functions are usually not quite correctly rounded, may not observe the optional rounding directions, and may not set the inexact exception correctly.

SYSTEM V EXCEPTION HANDLING

The System V Interface Definition (SVID) specifies exception handling for some libm functions: j0(), j1(), jn(), y0(), y1(), yn(), exp(), log(), log10(), pow(), sqrt(), hypot(), lgamma(), sinh(), cosh(), sin(), cos(), tan(), asin(), acos(), and atan2(). See matherr.3m for a discussion of the extent to which Sun's implementation of libm follows the SVID when it is consistent with the IEEE Standard and with hardware efficiency.

LIST OF MATH LIBRARY FUNCTIONS



Name Appears on Page Description

-	.Hr -url ../html3/bessel.3.html bessel(3))	 Bessel functions
-	.Hr -url ../html3/frexp.3.html frexp(3))	 floating-point analysis
-	.Hr -url ../html3/hyperbolic.3.html hyperbolic(3))	 hyperbolic functions
-	.Hr -url ../html3/ieee_functions.3.html ieee_functions(3))	 IEEE classification
-	.Hr -url ../html3/ieee_test.3.html ieee_test(3))	 IEEE tests for compliance
-	.Hr -url ../html3/ieee_values.3.html ieee_values(3))	 returns double-precision IEEE infinity
-	.Hr -url ../html3/trig.3.html trig(3))	 trigonometric functions
acos	trig(3M)	 trigonometric functions
acosh	hyperbolic(3M)	 hyperbolic functions
aint	rint(3M)	 round to integral value in floating-point or integer format
anint	rint(3M)	 round to integral value in floating-point or integer format
annuity	exp(3M)	 exponential, logarithm, power
asin	trig(3M)	 trigonometric functions
asinh	hyperbolic(3M)	 hyperbolic functions
atan	trig(3M)	 trigonometric functions
atan2	trig(3M)	 trigonometric functions
atanh	hyperbolic(3M)	 hyperbolic functions
cbrt	sqrt(3M)	 cube root, square root
ceil	rint(3M)	 round to integral value in floating-point or integer format
compound	exp(3M)	 exponential, logarithm, power
copysign	ieee_functions(3M)	miscellaneous functions for IEEE arithmetic
cos	trig(3M)	 trigonometric functions
cosh	hyperbolic(3M)	 hyperbolic functions
erf	erf(3M)	 error functions
erfc	erf(3M)	 error functions
exp	exp(3M)	 exponential, logarithm, power
exp2	exp(3M)	 exponential, logarithm, power
exp10	exp(3M)	 exponential, logarithm, power
expm1	exp(3M)	 exponential, logarithm, power
fabs	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
finite	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
floor	rint(3M)	 round to integral value in floating-point or integer format
fmod	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
fp_class	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
frexp	frexp(3M)	 traditional UNIX functions
HUGE	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
HUGE_VAL	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
hypot	hypot(3M)	 Euclidean distance
ieee_flags	ieee_flags(3M)	 mode and status function for IEEE standard arithmetic
ieee_functions	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
ieee_handler	ieee_handler(3M)	 IEEE exception trap handler function
ieee_test	ieee_test(3M)	 IEEE test functions for verifying standard compliance
ieee_values	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
ilogb	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
infinity	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
irint	rint(3M)	 round to integral value in floating-point or integer format
isinf	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
isnan	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
isnormal	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
issubnormal	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
iszero	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
j0	bessel(3M)	 Bessel functions
j1	bessel(3M)	 Bessel functions
jn	bessel(3M)	 Bessel functions
ldexp	frexp(3M)	 traditional UNIX functions
lgamma	lgamma(3M)	 log gamma function
log	exp(3M)	 exponential, logarithm, power
log2	exp(3M)	 exponential, logarithm, power
log10	exp(3M)	 exponential, logarithm, power
log1p	exp(3M)	 exponential, logarithm, power
logb	ieee_test(3M)	 IEEE test functions for verifying standard compliance
matherr	matherr(3M)	 math library exception-handling function
max_normal	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
max_subnormal	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
min_normal	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
min_subnormal	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
modf	frexp(3M)	 traditional UNIX functions
nextafter	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
nint	rint(3M)	 round to integral value in floating-point or integer format
pow	exp(3M)	 exponential, logarithm, power
quiet_nan	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
remainder	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
rint	rint(3M)	 round to integral value in floating-point or integer format
scalb	ieee_test(3M)	 IEEE test functions for verifying standard compliance
scalbn	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
signaling_nan	ieee_values(3M)	 functions that return extreme values of IEEE arithmetic
signbit	ieee_functions(3M)	 miscellaneous functions for IEEE arithmetic
significant	ieee_test(3M)	 IEEE test functions for verifying standard compliance
sin	trig(3M)	 trigonometric functions
single_precision	single_precision(3M)	 single-precision access to libm functions
sinh	hyperbolic(3M)	 hyperbolic functions
sqrt	sqrt(3M)	 cube root, square root
tan	trig(3M)	 trigonometric functions
tanh	hyperbolic(3M)	 hyperbolic functions
y0	bessel(3M)	 Bessel functions
y1	bessel(3M)	 Bessel functions
yn	bessel(3M)	 Bessel functions


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97