1INTRO(3)                   Library Functions Manual                   INTRO(3)
2
3
4

NAME

6       intro - introduction to library functions
7

SYNOPSIS

9       #include <stdio.h>
10
11       #include <math.h>
12

DESCRIPTION

14       This   section  describes  functions  that  may  be  found  in  various
15       libraries, other than those functions that directly invoke UNIX  system
16       primitives,  which  are  described in section 2.  Functions are divided
17       into various libraries distinguished by the section number at  the  top
18       of the page:
19
20       (3)   These  functions,  together  with  those  of  section 2 and those
21             marked (3S), constitute  library  libc,  which  is  automatically
22             loaded  by  the C compiler cc(1) and the Fortran compiler f77(1).
23             The link editor ld(1)  searches  this  library  under  the  `-lc'
24             option.  Declarations for some of these functions may be obtained
25             from include files indicated on the appropriate pages.
26
27       (3M)  These functions constitute the  math  library,  libm.   They  are
28             automatically  loaded  as  needed by the Fortran compiler f77(1).
29             The link editor searches this library  under  the  `-lm'  option.
30             Declarations for these functions may be obtained from the include
31             file <math.h>.
32
33       (3S)  These  functions  constitute  the  `standard  I/O  package',  see
34             stdio(3).   These  functions are in the library libc already men‐
35             tioned.  Declarations for these functions may  be  obtained  from
36             the include file <stdio.h>.
37
38       (3X)  Various  specialized  libraries  have  not been given distinctive
39             captions.  The files in which these libraries are found are named
40             on the appropriate pages.
41

FILES

43       /lib/libc.a
44       /lib/libm.a, /usr/lib/libm.a (one or the other)
45

SEE ALSO

47       stdio(3), nm(1), ld(1), cc(1), f77(1), intro(2)
48

DIAGNOSTICS

50       Functions  in the math library (3M) may return conventional values when
51       the function is undefined for the given arguments or when the value  is
52       not  representable.   In  these  cases the external variable errno (see
53       intro(2)) is set to the value EDOM or ERANGE.  The values of  EDOM  and
54       ERANGE are defined in the include file <math.h>.
55

ASSEMBLER

57       In  assembly language these functions may be accessed by simulating the
58       C calling sequence.  For example, ecvt(3) might be called this way:
59
60
61              setd
62              mov  $sign,-(sp)
63              mov  $decpt,-(sp)
64              mov  ndigit,-(sp)
65              movf value,-(sp)
66              jsr  pc,_ecvt
67              add  $14.,sp
68
69
70
71                                                                      INTRO(3)
Impressum