.\" @(#)Intro.3m 1.3 93/12/15 SMI; from UCB 4.3 BSD .TH Intro 3M "17 November 1993" .SH NAME Intro, intro \- introduction to mathematical library functions and constants .SH SYNOPSIS .B #include .PP .B #include .PP .B #include .PP .B #include .SH DESCRIPTION .IX introduction "mathematical library functions" .IX "mathematical library functions, introduction to" .IX "library functions" "introduction to mathematical" .B and .B define certain types and constants used for .B libm and .B libsunmath exception handling, conforming to .SM ANSI/IEEE Std 754-1985, the .IR "\s-1IEEE\s0 Standard for Binary Floating-Point Arithmetic" . .PP The include file .BR , located in the operating system area under .BR /usr/include , contains declarations of all the functions documented in the operating system manual page area under .B /usr/man/man3m comprising the operating system math library, .B libm located under .BR /usr/lib . C programs should be linked with the .B \-lm option in order to use this library. .PP The include file .BR , located in the unbundled products area, typically under .BR /opt/SUNWspro/SC\fIx.y.z\fP/include/cc , contains declarations of all the functions documented in the unbundled manual page area, typically under .B /opt/SUNWspro/man comprising the unbundled value-added math library, .B libsunmath located typically under .BR /opt/SUNWspro/SC\fIx.y.z\fP/lib . C programs should be linked with the .B "\-lsunmath \-lm" option in order to use this library. .SH "IEEE EXCEPTION HANDLING" The C compiler flag of .B \-xlibmieee should be used if the user prefers exception handling of the math libraries routines in the spirit of \s-1IEEE\s0754-1985. .PP The .SM IEEE Standard specifies exception handling for .\" aint/irint removed .BR ceil , .BR floor , .BR remainder , .B rint and .BR sqrt , and suggests appropriate exception handling for .\" fp_class/finite/isinf removed .BR copysign , .BR fabs , .BR fmod , .BR isnan , .BR ilogb , .BR ldexp , .BR logb , .BR nextafter , .B scalb and .BR scalbn , but does not specify exception handling for the other .B libm or .B libsunmath functions. .LP For these other unspecified functions the spirit of the .SM IEEE Standard is generally followed in .B libm and .B libsunmath 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. .PP These unspecified functions are usually not quite correctly rounded, may not observe the optional rounding directions, and may not set the inexact exception correctly. .SH "IEEE ENVIRONMENT" The .SM IEEE Standard specifies modes for rounding direction, precision, and exception trapping, and status reflecting accrued exceptions. These modes and status constitute the .SM IEEE run-time environment. .br .bp .so man3m/List.3m