[444] | 1 | \input texinfo.tex |
---|
| 2 | @setfilename libm.info |
---|
| 3 | |
---|
| 4 | @ifinfo |
---|
| 5 | @format |
---|
| 6 | @dircategory Newlib |
---|
| 7 | @direntry |
---|
| 8 | * libm: (libm). An ANSI-C conforming mathematical library. |
---|
| 9 | @end direntry |
---|
| 10 | @end format |
---|
| 11 | @end ifinfo |
---|
| 12 | |
---|
| 13 | @ifinfo |
---|
| 14 | This file documents an ANSI-C conforming mathematical subroutine library. |
---|
| 15 | |
---|
| 16 | Copyright (C) 1992, 1993, 1995, 1996-2014 Red Hat, Inc. |
---|
| 17 | |
---|
| 18 | @file{libm} includes software developed at SunPro, a Sun Microsystems, |
---|
| 19 | Inc. business. Permission to use, copy, modify, and distribute this |
---|
| 20 | software is freely granted, provided that this notice is preserved. |
---|
| 21 | |
---|
| 22 | Permission is granted to make and distribute verbatim copies of |
---|
| 23 | this manual provided the copyright notice and this permission notice |
---|
| 24 | are preserved on all copies. |
---|
| 25 | |
---|
| 26 | @ignore |
---|
| 27 | Permission is granted to process this file through Tex and print the |
---|
| 28 | results, provided the printed document carries copying permission |
---|
| 29 | notice identical to this one except for the removal of this paragraph |
---|
| 30 | (this paragraph not being relevant to the printed manual). |
---|
| 31 | |
---|
| 32 | @end ignore |
---|
| 33 | Permission is granted to copy and distribute modified versions of this |
---|
| 34 | manual under the conditions for verbatim copying, subject to the terms |
---|
| 35 | of the GNU General Public License, which includes the provision that the |
---|
| 36 | entire resulting derived work is distributed under the terms of a |
---|
| 37 | permission notice identical to this one. |
---|
| 38 | |
---|
| 39 | Permission is granted to copy and distribute translations of this manual |
---|
| 40 | into another language, under the above conditions for modified versions. |
---|
| 41 | @end ifinfo |
---|
| 42 | @iftex |
---|
| 43 | @finalout |
---|
| 44 | @setchapternewpage odd |
---|
| 45 | @settitle The Red Hat newlib C Math Library |
---|
| 46 | @titlepage |
---|
| 47 | @title The Red Hat newlib C Math Library |
---|
| 48 | @sp 1 |
---|
| 49 | @subtitle @code{libm} 2.5.0 |
---|
| 50 | @subtitle December 2016 |
---|
| 51 | @author {Steve Chamberlain} |
---|
| 52 | @author {Roland Pesch} |
---|
| 53 | @author {Red Hat Support} |
---|
| 54 | @author {Jeff Johnston} |
---|
| 55 | @page |
---|
| 56 | |
---|
| 57 | @tex |
---|
| 58 | {\parskip=0pt |
---|
| 59 | \hfill Red Hat Support\par |
---|
| 60 | \hfill sac@@cygnus.com\par |
---|
| 61 | \hfill pesch@@cygnus.com\par |
---|
| 62 | \hfill jjohnstn@@redhat.com\par |
---|
| 63 | } |
---|
| 64 | \global\parindent=0pt % Steve likes it this way |
---|
| 65 | @end tex |
---|
| 66 | |
---|
| 67 | @vskip 0pt plus 1filll |
---|
| 68 | Copyright @copyright{} 1992, 1993, 1994-2004 Red Hat, Inc. |
---|
| 69 | |
---|
| 70 | @file{libm} includes software developed at SunPro, a Sun Microsystems, |
---|
| 71 | Inc. business. Permission to use, copy, modify, and distribute this |
---|
| 72 | software is freely granted, provided that this notice is preserved. |
---|
| 73 | |
---|
| 74 | Permission is granted to make and distribute verbatim copies of |
---|
| 75 | this manual provided the copyright notice and this permission notice |
---|
| 76 | are preserved on all copies. |
---|
| 77 | |
---|
| 78 | Permission is granted to copy and distribute modified versions of this |
---|
| 79 | manual under the conditions for verbatim copying, subject to the terms |
---|
| 80 | of the GNU General Public License, which includes the provision that the |
---|
| 81 | entire resulting derived work is distributed under the terms of a |
---|
| 82 | permission notice identical to this one. |
---|
| 83 | |
---|
| 84 | Permission is granted to copy and distribute translations of this manual |
---|
| 85 | into another language, under the above conditions for modified versions. |
---|
| 86 | @end titlepage |
---|
| 87 | @end iftex |
---|
| 88 | |
---|
| 89 | @ifnottex |
---|
| 90 | @node Top |
---|
| 91 | @top LIBM |
---|
| 92 | @end ifnottex |
---|
| 93 | |
---|
| 94 | @menu |
---|
| 95 | * Math:: The mathematical functions (`math.h'). |
---|
| 96 | * Complex:: The mathematical complex functions (`complex.h'). |
---|
| 97 | * Reentrancy:: The functions in libm are not reentrant by default. |
---|
| 98 | * Long Double Functions:: The long double function support of libm. |
---|
| 99 | * Document Index:: |
---|
| 100 | @end menu |
---|
| 101 | |
---|
| 102 | @include targetdep.tex |
---|
| 103 | |
---|
| 104 | @node Reentrancy |
---|
| 105 | @chapter Reentrancy Properties of @code{libm} |
---|
| 106 | |
---|
| 107 | @cindex reentrancy |
---|
| 108 | @cindex @code{matherr} and reentrancy |
---|
| 109 | When a libm function detects an exceptional case, @code{errno} may be |
---|
| 110 | set, the @code{matherr} function may be called, and a error message |
---|
| 111 | may be written to the standard error stream. This behavior may not |
---|
| 112 | be reentrant. |
---|
| 113 | |
---|
| 114 | @c The exact behavior depends on the currently selected error handling |
---|
| 115 | @c mode (IEEE, POSIX, X/Open, or SVID). |
---|
| 116 | |
---|
| 117 | With reentrant C libraries like the Red Hat newlib C library, @code{errno} is |
---|
| 118 | a macro which expands to the per-thread error value. This makes it thread |
---|
| 119 | safe. |
---|
| 120 | |
---|
| 121 | When the user provides his own @code{matherr} function it must be |
---|
| 122 | reentrant for the math library as a whole to be reentrant. |
---|
| 123 | |
---|
| 124 | In normal debugged programs, there are usually no math subroutine |
---|
| 125 | errors---and therefore no assignments to @code{errno} and no @code{matherr} |
---|
| 126 | calls; in that situation, the math functions behave reentrantly. |
---|
| 127 | |
---|
| 128 | @node Long Double Functions |
---|
| 129 | @chapter The long double function support of @code{libm} |
---|
| 130 | Currently, the full set of long double math functions is only provided |
---|
| 131 | on platforms where long double equals double. |
---|
| 132 | For such platforms, the long double math functions are implemented as calls to the double versions. |
---|
| 133 | @node Document Index |
---|
| 134 | @unnumbered Document Index |
---|
| 135 | @printindex cp |
---|
| 136 | |
---|
| 137 | @tex |
---|
| 138 | % I think something like @@colophon should be in texinfo. In the |
---|
| 139 | % meantime: |
---|
| 140 | \long\def\colophon{\hbox to0pt{}\vfill |
---|
| 141 | \centerline{The body of this manual is set in} |
---|
| 142 | \centerline{\fontname\tenrm,} |
---|
| 143 | \centerline{with headings in {\bf\fontname\tenbf}} |
---|
| 144 | \centerline{and examples in {\tt\fontname\tentt}.} |
---|
| 145 | \centerline{{\it\fontname\tenit\/} and} |
---|
| 146 | \centerline{{\sl\fontname\tensl\/}} |
---|
| 147 | \centerline{are used for emphasis.}\vfill} |
---|
| 148 | \page\colophon |
---|
| 149 | % Blame: pesch@@cygnus.com, 28mar91. |
---|
| 150 | @end tex |
---|
| 151 | |
---|
| 152 | @contents |
---|
| 153 | @bye |
---|
| 154 | |
---|
| 155 | |
---|