aboutsummaryrefslogtreecommitdiff
path: root/newlib/libm/libm.texinfo
blob: a579a174331b46ddd39378317f300f38390c5853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
\input texinfo.tex
@setfilename libm.info

@ifinfo
@format
@dircategory Newlib
@direntry
* libm: (libm).                 An ANSI-C conforming mathematical library.
@end direntry
@end format
@end ifinfo

@ifinfo
This file documents an ANSI-C conforming mathematical subroutine library.

Copyright (C) 1992, 1993, 1995, 1996-2014 Red Hat, Inc. 

@file{libm} includes software developed at SunPro, a Sun Microsystems,
Inc. business.  Permission to use, copy, modify, and distribute this
software is freely granted, provided that this notice is preserved.

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

@ignore
Permission is granted to process this file through Tex and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).

@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, subject to the terms
of the GNU General Public License, which includes the provision that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
@end ifinfo
@iftex
@finalout
@setchapternewpage odd
@settitle The Red Hat newlib C Math Library
@titlepage
@title The Red Hat newlib C Math Library
@sp 1
@subtitle @code{libm} 2.5.0
@subtitle December 2016
@author {Steve Chamberlain}
@author {Roland Pesch}
@author {Red Hat Support}
@author {Jeff Johnston}
@page

@tex
{\parskip=0pt
\hfill Red Hat Support\par
\hfill sac@@cygnus.com\par
\hfill pesch@@cygnus.com\par
\hfill jjohnstn@@redhat.com\par
}
\global\parindent=0pt % Steve likes it this way
@end tex

@vskip 0pt plus 1filll
Copyright @copyright{} 1992, 1993, 1994-2004 Red Hat, Inc. 

@file{libm} includes software developed at SunPro, a Sun Microsystems,
Inc. business.  Permission to use, copy, modify, and distribute this
software is freely granted, provided that this notice is preserved.

Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.

Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, subject to the terms
of the GNU General Public License, which includes the provision that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
@end titlepage
@end iftex

@ifnottex
@node Top
@top LIBM
@end ifnottex

@menu
* Math::           The mathematical functions (`math.h').
* Complex::        The mathematical complex functions (`complex.h').
* Reentrancy::     The functions in libm are not reentrant by default.
* Long Double Functions:: The long double function support of libm.
* Document Index::
@end menu

@include targetdep.tex

@node Reentrancy
@chapter Reentrancy Properties of @code{libm}

@cindex reentrancy
@cindex @code{matherr} and reentrancy
When a libm function detects an exceptional case, @code{errno} may be
set.

@c The exact behavior depends on the currently selected error handling 
@c mode (IEEE or POSIX).

@code{errno} is a macro which expands to the per-thread error value.
This makes it thread safe, and therefore reentrant.

@node Long Double Functions
@chapter The long double function support of @code{libm}
Currently, the full set of long double math functions is only provided
on platforms where long double equals double.
For such platforms, the long double math functions are implemented as calls to the double versions.
@node Document Index
@unnumbered Document Index
@printindex cp

@tex
% I think something like @@colophon should be in texinfo.  In the
% meantime:
\long\def\colophon{\hbox to0pt{}\vfill
\centerline{The body of this manual is set in}
\centerline{\fontname\tenrm,}
\centerline{with headings in {\bf\fontname\tenbf}}
\centerline{and examples in {\tt\fontname\tentt}.}
\centerline{{\it\fontname\tenit\/} and}
\centerline{{\sl\fontname\tensl\/}}
\centerline{are used for emphasis.}\vfill}
\page\colophon
% Blame: pesch@@cygnus.com, 28mar91.
@end tex

@contents
@bye