fix ulp check in sincosf
[libc-test.git] / src / math / ucb / atanf.h
bloba6fd54b96c51efb1540cd908cf9328a1a8b54570
1 // Copyright (C) 1988-1994 Sun Microsystems, Inc. 2550 Garcia Avenue
2 // Mountain View, California 94043 All rights reserved.
3 //
4 // Any person is hereby authorized to download, copy, use, create bug fixes,
5 // and distribute, subject to the following conditions:
6 //
7 // 1. the software may not be redistributed for a fee except as
8 // reasonable to cover media costs;
9 // 2. any copy of the software must include this notice, as well as
10 // any other embedded copyright notices; and
11 // 3. any distribution of this software or derivative works thereof
12 // must comply with all applicable U.S. export control laws.
14 // THE SOFTWARE IS MADE AVAILABLE "AS IS" AND WITHOUT EXPRESS OR IMPLIED
15 // WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO THE IMPLIED
16 // WARRANTIES OF DESIGN, MERCHANTIBILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE, NON-INFRINGEMENT, PERFORMANCE OR CONFORMANCE TO
18 // SPECIFICATIONS.
20 // BY DOWNLOADING AND/OR USING THIS SOFTWARE, THE USER WAIVES ALL CLAIMS
21 // AGAINST SUN MICROSYSTEMS, INC. AND ITS AFFILIATED COMPANIES IN ANY
22 // JURISDICTION, INCLUDING BUT NOT LIMITED TO CLAIMS FOR DAMAGES OR
23 // EQUITABLE RELIEF BASED ON LOSS OF DATA, AND SPECIFICALLY WAIVES EVEN
24 // UNKNOWN OR UNANTICIPATED CLAIMS OR LOSSES, PRESENT AND FUTURE.
26 // IN NO EVENT WILL SUN MICROSYSTEMS, INC. OR ANY OF ITS AFFILIATED
27 // COMPANIES BE LIABLE FOR ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL,
28 // INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF IT HAS BEEN ADVISED OF THE
29 // POSSIBILITY OF SUCH DAMAGES.
31 // This file is provided with no support and without any obligation on the
32 // part of Sun Microsystems, Inc. ("Sun") or any of its affiliated
33 // companies to assist in its use, correction, modification or
34 // enhancement. Nevertheless, and without creating any obligation on its
35 // part, Sun welcomes your comments concerning the software and requests
36 // that they be sent to fdlibm-comments@sunpro.sun.com.
37 // atans(+-max) is +-pi/2
38 T(RN, 0x1.fffffep+127, 0x1.921fb6p+0, 0x1.777a5cp-2, INEXACT)
39 T(RN,-0x1.fffffep+127, -0x1.921fb6p+0, -0x1.777a5cp-2, INEXACT)
40 // atans(+-1) is +-pi/4
41 T(RN, 0x1p+0, 0x1.921fb6p-1, 0x1.777a5cp-2, INEXACT)
42 T(RN, -0x1p+0, -0x1.921fb6p-1, -0x1.777a5cp-2, INEXACT)
43 // atans(tiny) is tiny
44 T(RN, 0x1p-29, 0x1p-29, 0x1.555556p-37, INEXACT)
45 T(RN, -0x1p-29, -0x1p-29, -0x1.555556p-37, INEXACT)
46 T(RN, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
47 T(RN, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
48 T(RZ, 0x1p-29, 0x1.fffffep-30, -0x1p+0, INEXACT)
49 T(RZ, -0x1p-29, -0x1.fffffep-30, 0x1p+0, INEXACT)
50 T(RZ, 0x1p-126, 0x1.fffffcp-127, -0x1p+0, INEXACT|UNDERFLOW)
51 T(RZ, -0x1p-126,-0x1.fffffcp-127, 0x1p+0, INEXACT|UNDERFLOW)
52 T(RU, 0x1p-29, 0x1p-29, 0x1.555556p-37, INEXACT)
53 T(RU, -0x1p-29, -0x1.fffffep-30, 0x1p+0, INEXACT)
54 T(RU, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
55 T(RU, -0x1p-126,-0x1.fffffcp-127, 0x1p+0, INEXACT|UNDERFLOW)
56 T(RD, 0x1p-29, 0x1.fffffep-30, -0x1p+0, INEXACT)
57 T(RD, -0x1p-29, -0x1p-29, -0x1.555556p-37, INEXACT)
58 T(RD, 0x1p-126, 0x1.fffffcp-127, -0x1p+0, INEXACT|UNDERFLOW)
59 T(RD, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
60 // atans(+-0) is +-0
61 T(RN, 0x0p+0, 0x0p+0, 0x0p+0, 0)
62 T(RN, -0x0p+0, -0x0p+0, 0x0p+0, 0)
63 T(RZ, 0x0p+0, 0x0p+0, 0x0p+0, 0)
64 T(RZ, -0x0p+0, -0x0p+0, 0x0p+0, 0)
65 T(RU, 0x0p+0, 0x0p+0, 0x0p+0, 0)
66 T(RU, -0x0p+0, -0x0p+0, 0x0p+0, 0)
67 T(RD, 0x0p+0, 0x0p+0, 0x0p+0, 0)
68 T(RD, -0x0p+0, -0x0p+0, 0x0p+0, 0)
69 // random arguments between -2 and 2
70 T(RN, -0x1.13284cp-1, -0x1.f8f75ep-2, -0x1.ffeb8ap-2, INEXACT)
71 T(RN, 0x1.6ca8ep+0, 0x1.eadc6ep-1, 0x1.cd861ap-2, INEXACT)
72 T(RN, 0x1.c2ca6p+0, 0x1.0de7f8p+0, -0x1.c7422ap-2, INEXACT)
73 T(RN, -0x1.55f12p+0, -0x1.db367cp-1, -0x1.c22522p-2, INEXACT)
74 T(RN, -0x1.15679ep-1, -0x1.fc7284p-2, 0x1.82b19ep-3, INEXACT)
75 T(RN, -0x1.41e132p-4, -0x1.413834p-4, -0x1.8b82b8p-2, INEXACT)
76 T(RN, 0x1.281b0ep+0, 0x1.b74042p-1, 0x1.b8739ep-3, INEXACT)
77 T(RN, 0x1.b5ce34p+0, 0x1.0aab58p+0, -0x1.2c3954p-2, INEXACT)
78 T(RN, -0x1.583482p-2, -0x1.4c0e14p-2, -0x1.6847fap-3, INEXACT)
79 T(RN, -0x1.ea8224p+0, -0x1.16fb9cp+0, -0x1.d09d38p-2, INEXACT)
80 T(RZ, -0x1.13284cp-1, -0x1.f8f75cp-2, 0x1.000a3ap-1, INEXACT)
81 T(RZ, 0x1.6ca8ep+0, 0x1.eadc6cp-1, -0x1.193cf2p-1, INEXACT)
82 T(RZ, 0x1.c2ca6p+0, 0x1.0de7f8p+0, -0x1.c7422ap-2, INEXACT)
83 T(RZ, -0x1.55f12p+0, -0x1.db367ap-1, 0x1.1eed6ep-1, INEXACT)
84 T(RZ, -0x1.15679ep-1, -0x1.fc7284p-2, 0x1.82b19ep-3, INEXACT)
85 T(RZ, -0x1.41e132p-4, -0x1.413832p-4, 0x1.3a3ea4p-1, INEXACT)
86 T(RZ, 0x1.281b0ep+0, 0x1.b7404p-1, -0x1.91e318p-1, INEXACT)
87 T(RZ, 0x1.b5ce34p+0, 0x1.0aab58p+0, -0x1.2c3954p-2, INEXACT)
88 T(RZ, -0x1.583482p-2, -0x1.4c0e12p-2, 0x1.a5ee02p-1, INEXACT)
89 T(RZ, -0x1.ea8224p+0, -0x1.16fb9ap+0, 0x1.17b164p-1, INEXACT)
90 T(RU, -0x1.13284cp-1, -0x1.f8f75cp-2, 0x1.000a3ap-1, INEXACT)
91 T(RU, 0x1.6ca8ep+0, 0x1.eadc6ep-1, 0x1.cd861ap-2, INEXACT)
92 T(RU, 0x1.c2ca6p+0, 0x1.0de7fap+0, 0x1.1c5eecp-1, INEXACT)
93 T(RU, -0x1.55f12p+0, -0x1.db367ap-1, 0x1.1eed6ep-1, INEXACT)
94 T(RU, -0x1.15679ep-1, -0x1.fc7284p-2, 0x1.82b19ep-3, INEXACT)
95 T(RU, -0x1.41e132p-4, -0x1.413832p-4, 0x1.3a3ea4p-1, INEXACT)
96 T(RU, 0x1.281b0ep+0, 0x1.b74042p-1, 0x1.b8739ep-3, INEXACT)
97 T(RU, 0x1.b5ce34p+0, 0x1.0aab5ap+0, 0x1.69e356p-1, INEXACT)
98 T(RU, -0x1.583482p-2, -0x1.4c0e12p-2, 0x1.a5ee02p-1, INEXACT)
99 T(RU, -0x1.ea8224p+0, -0x1.16fb9ap+0, 0x1.17b164p-1, INEXACT)
100 T(RD, -0x1.13284cp-1, -0x1.f8f75ep-2, -0x1.ffeb8ap-2, INEXACT)
101 T(RD, 0x1.6ca8ep+0, 0x1.eadc6cp-1, -0x1.193cf2p-1, INEXACT)
102 T(RD, 0x1.c2ca6p+0, 0x1.0de7f8p+0, -0x1.c7422ap-2, INEXACT)
103 T(RD, -0x1.55f12p+0, -0x1.db367cp-1, -0x1.c22522p-2, INEXACT)
104 T(RD, -0x1.15679ep-1, -0x1.fc7286p-2, -0x1.9f5398p-1, INEXACT)
105 T(RD, -0x1.41e132p-4, -0x1.413834p-4, -0x1.8b82b8p-2, INEXACT)
106 T(RD, 0x1.281b0ep+0, 0x1.b7404p-1, -0x1.91e318p-1, INEXACT)
107 T(RD, 0x1.b5ce34p+0, 0x1.0aab58p+0, -0x1.2c3954p-2, INEXACT)
108 T(RD, -0x1.583482p-2, -0x1.4c0e14p-2, -0x1.6847fap-3, INEXACT)
109 T(RD, -0x1.ea8224p+0, -0x1.16fb9cp+0, -0x1.d09d38p-2, INEXACT)
110 // atans(+-inf) is +-pi/2
111 T(RN, inf, 0x1.921fb6p+0, 0x1.777a5cp-2, INEXACT)
112 T(RN, -inf, -0x1.921fb6p+0, -0x1.777a5cp-2, INEXACT)
113 // atans(nan) is nan
114 T(RN, nan, nan, 0x0p+0, 0)
115 T(RN, nan, nan, 0x0p+0, 0)
116 T(RZ, nan, nan, 0x0p+0, 0)
117 T(RZ, nan, nan, 0x0p+0, 0)
118 T(RU, nan, nan, 0x0p+0, 0)
119 T(RU, nan, nan, 0x0p+0, 0)
120 T(RD, nan, nan, 0x0p+0, 0)
121 T(RD, nan, nan, 0x0p+0, 0)
122 T(RD, 0x1.000002p-126, 0x1p-126, -0x1p+0, INEXACT)
123 T(RD, 0x1.000004p-126, 0x1.000002p-126, -0x1p+0, INEXACT)
124 T(RD, 0x1p-125, 0x1.fffffep-126, -0x1p+0, INEXACT)
125 T(RD, 0x1p-124, 0x1.fffffep-125, -0x1p+0, INEXACT)
126 T(RD,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
127 T(RD,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
128 T(RD,-0x1.fffff6p-126,-0x1.fffff6p-126, 0x0p+0, INEXACT)
129 T(RD, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
130 T(RD,-0x1.000006p-125,-0x1.000006p-125, 0x0p+0, INEXACT)
131 T(RD, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
132 T(RD, 0x1p-149, 0x0p+0, -0x1p+0, INEXACT|UNDERFLOW)
133 T(RD, 0x1p-148, 0x1p-149, -0x1p+0, INEXACT|UNDERFLOW)
134 T(RD, 0x1p-128, 0x1.fffffp-129, -0x1p+0, INEXACT|UNDERFLOW)
135 T(RD, 0x1p-127, 0x1.fffff8p-128, -0x1p+0, INEXACT|UNDERFLOW)
136 T(RD, 0x1.fffff8p-127, 0x1.fffff4p-127, -0x1p+0, INEXACT|UNDERFLOW)
137 T(RD, 0x1.fffffcp-127, 0x1.fffff8p-127, -0x1p+0, INEXACT|UNDERFLOW)
138 T(RD, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
139 T(RD, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
140 T(RD, -0x1.2p-146, -0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
141 T(RD, -0x1p-128, -0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
142 T(RD, -0x1p-127, -0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
143 T(RD,-0x1.fffff8p-127,-0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
144 T(RD,-0x1.fffffcp-127,-0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
145 T(RD, 0x1.8p-27, 0x1.7ffffep-27, -0x1p+0, INEXACT)
146 T(RD, 0x1p-12, 0x1.fffffep-13, -0x1.555556p-1, INEXACT)
147 T(RD, -0x1.8p-27, -0x1.8p-27, -0x1.2p-31, INEXACT)
148 T(RD, -0x1p-12, -0x1p-12, -0x1.555554p-3, INEXACT)
149 T(RN, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
150 T(RN, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
151 T(RN, 0x1.fffff6p-126, 0x1.fffff6p-126, 0x0p+0, INEXACT)
152 T(RN, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
153 T(RN, 0x1.000006p-125, 0x1.000006p-125, 0x0p+0, INEXACT)
154 T(RN, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
155 T(RN, 0x1.8p-27, 0x1.8p-27, 0x1.2p-31, INEXACT)
156 T(RN, 0x1p-12, 0x1p-12, 0x1.555554p-3, INEXACT)
157 T(RN,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
158 T(RN,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
159 T(RN,-0x1.fffff6p-126,-0x1.fffff6p-126, 0x0p+0, INEXACT)
160 T(RN, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
161 T(RN,-0x1.000006p-125,-0x1.000006p-125, 0x0p+0, INEXACT)
162 T(RN, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
163 T(RN, -0x1.8p-27, -0x1.8p-27, -0x1.2p-31, INEXACT)
164 T(RN, -0x1p-12, -0x1p-12, -0x1.555554p-3, INEXACT)
165 T(RN, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
166 T(RN, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
167 T(RN, 0x1.2p-146, 0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
168 T(RN, 0x1p-128, 0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
169 T(RN, 0x1p-127, 0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
170 T(RN, 0x1.fffff8p-127, 0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
171 T(RN, 0x1.fffffcp-127, 0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
172 T(RN, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
173 T(RN, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
174 T(RN, -0x1.2p-146, -0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
175 T(RN, -0x1p-128, -0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
176 T(RN, -0x1p-127, -0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
177 T(RN,-0x1.fffff8p-127,-0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
178 T(RN,-0x1.fffffcp-127,-0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
179 T(RU, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
180 T(RU, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
181 T(RU, 0x1.fffff6p-126, 0x1.fffff6p-126, 0x0p+0, INEXACT)
182 T(RU, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
183 T(RU, 0x1.000006p-125, 0x1.000006p-125, 0x0p+0, INEXACT)
184 T(RU, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
185 T(RU,-0x1.000002p-126, -0x1p-126, 0x1p+0, INEXACT)
186 T(RU,-0x1.000004p-126,-0x1.000002p-126, 0x1p+0, INEXACT)
187 T(RU, -0x1p-125,-0x1.fffffep-126, 0x1p+0, INEXACT)
188 T(RU, -0x1p-124,-0x1.fffffep-125, 0x1p+0, INEXACT)
189 T(RU, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
190 T(RU, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
191 T(RU, 0x1.2p-146, 0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
192 T(RU, 0x1p-128, 0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
193 T(RU, 0x1p-127, 0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
194 T(RU, 0x1.fffff8p-127, 0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
195 T(RU, 0x1.fffffcp-127, 0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
196 T(RU, -0x1p-149, -0x0p+0, 0x1p+0, INEXACT|UNDERFLOW)
197 T(RU, -0x1p-148, -0x1p-149, 0x1p+0, INEXACT|UNDERFLOW)
198 T(RU, -0x1p-128, -0x1.fffffp-129, 0x1p+0, INEXACT|UNDERFLOW)
199 T(RU, -0x1p-127,-0x1.fffff8p-128, 0x1p+0, INEXACT|UNDERFLOW)
200 T(RU,-0x1.fffff8p-127,-0x1.fffff4p-127, 0x1p+0, INEXACT|UNDERFLOW)
201 T(RU,-0x1.fffffcp-127,-0x1.fffff8p-127, 0x1p+0, INEXACT|UNDERFLOW)
202 T(RU, 0x1.8p-27, 0x1.8p-27, 0x1.2p-31, INEXACT)
203 T(RU, 0x1p-12, 0x1p-12, 0x1.555554p-3, INEXACT)
204 T(RU, -0x1.8p-27, -0x1.7ffffep-27, 0x1p+0, INEXACT)
205 T(RU, -0x1p-12, -0x1.fffffep-13, 0x1.555556p-1, INEXACT)
206 T(RZ, 0x1.000002p-126, 0x1p-126, -0x1p+0, INEXACT)
207 T(RZ, 0x1.000004p-126, 0x1.000002p-126, -0x1p+0, INEXACT)
208 T(RZ, 0x1p-125, 0x1.fffffep-126, -0x1p+0, INEXACT)
209 T(RZ, 0x1p-124, 0x1.fffffep-125, -0x1p+0, INEXACT)
210 T(RZ,-0x1.000002p-126, -0x1p-126, 0x1p+0, INEXACT)
211 T(RZ,-0x1.000004p-126,-0x1.000002p-126, 0x1p+0, INEXACT)
212 T(RZ, -0x1p-125,-0x1.fffffep-126, 0x1p+0, INEXACT)
213 T(RZ, -0x1p-124,-0x1.fffffep-125, 0x1p+0, INEXACT)
214 T(RZ, 0x1p-149, 0x0p+0, -0x1p+0, INEXACT|UNDERFLOW)
215 T(RZ, 0x1p-148, 0x1p-149, -0x1p+0, INEXACT|UNDERFLOW)
216 T(RZ, 0x1p-128, 0x1.fffffp-129, -0x1p+0, INEXACT|UNDERFLOW)
217 T(RZ, 0x1p-127, 0x1.fffff8p-128, -0x1p+0, INEXACT|UNDERFLOW)
218 T(RZ, 0x1.fffff8p-127, 0x1.fffff4p-127, -0x1p+0, INEXACT|UNDERFLOW)
219 T(RZ, 0x1.fffffcp-127, 0x1.fffff8p-127, -0x1p+0, INEXACT|UNDERFLOW)
220 T(RZ, -0x1p-149, -0x0p+0, 0x1p+0, INEXACT|UNDERFLOW)
221 T(RZ, -0x1p-148, -0x1p-149, 0x1p+0, INEXACT|UNDERFLOW)
222 T(RZ, -0x1p-128, -0x1.fffffp-129, 0x1p+0, INEXACT|UNDERFLOW)
223 T(RZ, -0x1p-127,-0x1.fffff8p-128, 0x1p+0, INEXACT|UNDERFLOW)
224 T(RZ,-0x1.fffff8p-127,-0x1.fffff4p-127, 0x1p+0, INEXACT|UNDERFLOW)
225 T(RZ,-0x1.fffffcp-127,-0x1.fffff8p-127, 0x1p+0, INEXACT|UNDERFLOW)
226 T(RZ, 0x1.8p-27, 0x1.7ffffep-27, -0x1p+0, INEXACT)
227 T(RZ, 0x1p-12, 0x1.fffffep-13, -0x1.555556p-1, INEXACT)
228 T(RZ, -0x1.8p-27, -0x1.7ffffep-27, 0x1p+0, INEXACT)
229 T(RZ, -0x1p-12, -0x1.fffffep-13, 0x1.555556p-1, INEXACT)