.TH "libm" "" "" Library
.PC "\*(CO mathematics library"
.B /lib/libm.a
.PP
.II "mathematics library"
.II "library^mathematics"
The \*(CO mathematics library
.B libm
contains the following useful mathematics functions:
.LB
\fBacos()\fR	Calculate inverse cosine
\fBasin()\fR	Calculate inverse sine
\fBatan()\fR	Calculate inverse tangent
\fBatan2()\fR	Calculate inverse tangent of quotient
\fBcabs()\fR	Calculate complex absolute value
\fBceil()\fR	Set numeric ceiling
\fBcos()\fR	Calculate cosine
\fBcosh()\fR	Calculate hyperbolic cosine
\fBexp()\fR	Calculate exponent
\fBfabs()\fR	Calculate absolute value function
\fBfloor()\fR	Calculate floor function
\fBfmod()\fR	Calculate modulus for floating-point number
\fBhypot()\fR	Calculate hypotenuse
\fBj0()\fR	Calculate Bessel function, order 0
\fBj1()\fR	Calculate Bessel function, order 1
\fBjn()\fR	Calculate Bessel function, order \fIn\fR
\fBlog()\fR	Calculate natural logarithm
\fBlog10()\fR	Calculate common logarithm
\fBpow()\fR	Calculate power
\fBsin()\fR	Calculate sine
\fBsinh()\fR	Calculate hyperbolic sine
\fBsqrt()\fR	Calculate square root
\fBtan()\fR	Calculate tangent
\fBtanh()\fR	Calculate hyperbolic tangent
.SH "See Also"
.Xr "libmp," libmp
.Xr "libraries," libraries
.Xr "math.h" math.h
.sp \n(pDu
Hart, J.F., et al.:
\fIComputer Approximations.\fR
New York,
John Wiley & Sons, 1968.
.sp \n(pDu
Press, W.H., Flannery, B.P., Teukolsky, S.A., Vetterling, W.T.:
\fINumerical Recipes in C.\fR
New York,
Cambridge University Press, 1988.
\fIHighly recommended.\fR
.SH Notes
When programs that contain mathematics routines are compiled,
you must explicitly name the mathematics library on the
.B cc
command line.
For example, to compile the example presented under the
entry for
.BR acos() ,
use the following
.B cc
command line:
.DM
	cc -f acos.c -lm
.DE
.PP
The
.B \-f
option links in the floating point
routines for
.BR printf() ,
while the
.B \-lm
option links in the mathematics libraries.
Note that the
.B \-lm
option must come
.I last
on the
.B cc
command line, or the library will not be searched properly.
.PP
The related library
.B libmp
performs multi-precision arithmetic.
With these routines, you can perform arithmetic on extremely large numbers,
to an extremely fine precision.
For details,
see the Lexicon entry for
.BR libmp .
