2000-02-18 03:39:52 +08:00
|
|
|
\input texinfo.tex
|
|
|
|
@setfilename libm.info
|
|
|
|
@tex
|
|
|
|
% NOTE LOCAL KLUGE TO AVOID TOO MUCH WHITESPACE FROM "makedoc"
|
|
|
|
\global\long\def\example{%
|
|
|
|
\begingroup
|
|
|
|
\let\aboveenvbreak=\par
|
|
|
|
\let\afterenvbreak=\par
|
|
|
|
\parskip=0pt
|
|
|
|
\lisp}
|
|
|
|
\global\long\def\Eexample{%
|
|
|
|
\Elisp
|
|
|
|
\endgroup
|
|
|
|
\vskip -\parskip% to cancel out effect of following \par
|
|
|
|
}
|
|
|
|
% END LOCAL WHITESPACE KLUGE
|
|
|
|
@end tex
|
|
|
|
@syncodeindex fn cp
|
|
|
|
|
|
|
|
@ifinfo
|
|
|
|
@format
|
|
|
|
START-INFO-DIR-ENTRY
|
|
|
|
* libm:: An ANSI-C conforming mathematical library.
|
|
|
|
END-INFO-DIR-ENTRY
|
|
|
|
@end format
|
|
|
|
@end ifinfo
|
|
|
|
|
|
|
|
@ifinfo
|
|
|
|
This file documents an ANSI-C conforming mathematical subroutine library.
|
|
|
|
|
2004-01-07 03:26:10 +08:00
|
|
|
Copyright (C) 1992, 1993, 1995, 1996-2004 Red Hat, Inc.
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
@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
|
2002-07-23 00:40:48 +08:00
|
|
|
@settitle The Red Hat newlib C Math Library
|
2000-02-18 03:39:52 +08:00
|
|
|
@titlepage
|
2002-07-23 00:40:48 +08:00
|
|
|
@title The Red Hat newlib C Math Library
|
2000-02-18 03:39:52 +08:00
|
|
|
@sp 1
|
2004-02-03 06:51:39 +08:00
|
|
|
@subtitle @code{libm} 1.12.0
|
|
|
|
@subtitle January 2004
|
2000-02-18 03:39:52 +08:00
|
|
|
@author {Steve Chamberlain}
|
|
|
|
@author {Roland Pesch}
|
2002-07-23 00:40:48 +08:00
|
|
|
@author {Red Hat Support}
|
|
|
|
@author {Jeff Johnston}
|
2000-02-18 03:39:52 +08:00
|
|
|
@page
|
|
|
|
|
|
|
|
@tex
|
|
|
|
{\parskip=0pt
|
2002-07-23 00:40:48 +08:00
|
|
|
\hfill Red Hat Support\par
|
2000-02-18 03:39:52 +08:00
|
|
|
\hfill sac@@cygnus.com\par
|
|
|
|
\hfill pesch@@cygnus.com\par
|
2004-01-07 03:26:10 +08:00
|
|
|
\hfill jjohnstn@@redhat.com\par
|
2000-02-18 03:39:52 +08:00
|
|
|
}
|
|
|
|
\global\parindent=0pt % Steve likes it this way
|
|
|
|
@end tex
|
|
|
|
|
|
|
|
@vskip 0pt plus 1filll
|
2004-01-07 03:26:10 +08:00
|
|
|
Copyright @copyright{} 1992, 1993, 1994-2004 Red Hat, Inc.
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
@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
|
|
|
|
|
|
|
|
@ifinfo
|
|
|
|
@node Top
|
|
|
|
@top LIBM
|
|
|
|
@end ifinfo
|
|
|
|
|
|
|
|
@menu
|
|
|
|
* Math:: The mathematical functions (`math.h').
|
|
|
|
* Reentrancy:: The functions in libm are not reentrant by default.
|
|
|
|
* 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, the @code{matherr} function may be called, and a error message
|
|
|
|
may be written to the standard error stream. This behavior may not
|
|
|
|
be reentrant.
|
|
|
|
|
|
|
|
@c The exact behavior depends on the currently selected error handling
|
|
|
|
@c mode (IEEE, POSIX, X/Open, or SVID).
|
|
|
|
|
2002-07-23 00:40:48 +08:00
|
|
|
With reentrant C libraries like the Red Hat newlib C library, @code{errno} is
|
2000-02-18 03:39:52 +08:00
|
|
|
a macro which expands to the per-thread error value. This makes it thread
|
|
|
|
safe.
|
|
|
|
|
|
|
|
When the user provides his own @code{matherr} function it must be
|
|
|
|
reentrant for the math library as a whole to be reentrant.
|
|
|
|
|
|
|
|
In normal debugged programs, there are usually no math subroutine
|
|
|
|
errors---and therefore no assignments to @code{errno} and no @code{matherr}
|
|
|
|
calls; in that situation, the math functions behave reentrantly.
|
|
|
|
|
|
|
|
@node Index
|
|
|
|
@unnumbered 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
|
|
|
|
|
|
|
|
|