# math(3) - NetBSD Manual Pages

Command: Section: Arch: Collection:
```MATH(3)                 NetBSD Library Functions Manual                MATH(3)

NAME
math -- introduction to mathematical library functions

LIBRARY
Math Library (libm, -lm)

SYNOPSIS
#include <math.h>

DESCRIPTION
These functions constitute the C Math Library (libm, -lm).  Declarations
for these functions may be obtained from the include file <math.h>.

List of Functions
Name         Man page     Description                    Error Bound
(ULPs)
acos         acos(3)      inverse trigonometric function 3
acosh        acosh(3)     inverse hyperbolic function    3
asin         asin(3)      inverse trigonometric function 3
asinh        asinh(3)     inverse hyperbolic function    3
atan         atan(3)      inverse trigonometric function 1
atanh        atanh(3)     inverse hyperbolic function    3
atan2        atan2(3)     inverse trigonometric function 2
cbrt         sqrt(3)      cube root                      1
ceil         ceil(3)      integer no less than           0
copysign     copysign(3)  copy sign bit                  0
cos          cos(3)       trigonometric function         1
cosh         cosh(3)      hyperbolic function            3
erf          erf(3)       error function                 ???
erfc         erf(3)       complementary error function   ???
exp          exp(3)       base e exponential             1
exp2         exp2(3)      base 2 exponential             ???
expm1        expm1(3)     exp(x)-1                       1
fabs         fabs(3)      absolute value                 0
fdim         fdim(3)      positive difference            ???
finite       finite(3)    test for finity                0
floor        floor(3)     integer no greater than        0
fmax         fmax(3)      maximum                        0
fmin         fmin(3)      minimum                        0
fmod         fmod(3)      remainder                      ???
hypot        hypot(3)     Euclidean distance             1
ilogb        ilogb(3)     exponent extraction            0
isinf        isinf(3)     test for infinity              0
isnan        isnan(3)     test for not-a-number          0
j0           j0(3)        Bessel function                ???
j1           j0(3)        Bessel function                ???
jn           j0(3)        Bessel function                ???
lgamma       lgamma(3)    log gamma function             ???
log          log(3)       natural logarithm              1
log10        log(3)       logarithm to base 10           3
log1p        log(3)       log(1+x)                       1
nan          nan(3)       return quiet NaN               0
nextafter    nextafter(3) next representable number      0
pow          pow(3)       exponential x**y               60-500
remainder    remainder(3) remainder                      0
rint         rint(3)      round to nearest integer       0
sin          sin(3)       trigonometric function         1
sinh         sinh(3)      hyperbolic function            3
sqrt         sqrt(3)      square root                    1
tan          tan(3)       trigonometric function         3
tanh         tanh(3)      hyperbolic function            3
trunc        trunc(3)     nearest integral value         3
y0           j0(3)        Bessel function                ???
y1           j0(3)        Bessel function                ???
yn           j0(3)        Bessel function                ???

List of Defined Values
Name            Value                       Description
M_E             2.7182818284590452354       e
M_LOG2E         1.4426950408889634074       log 2e
M_LOG10E        0.43429448190325182765      log 10e
M_LN2           0.69314718055994530942      log e2
M_LN10          2.30258509299404568402      log e10
M_PI            3.14159265358979323846      pi
M_PI_2          1.57079632679489661923      pi/2
M_PI_4          0.78539816339744830962      pi/4
M_1_PI          0.31830988618379067154      1/pi
M_2_PI          0.63661977236758134308      2/pi
M_2_SQRTPI      1.12837916709551257390      2/sqrt(pi)
M_SQRT2         1.41421356237309504880      sqrt(2)
M_SQRT1_2       0.70710678118654752440      1/sqrt(2)

```
Powered by man-cgi (2021-06-01). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.