fix ulp check in sincosf
[libc-test.git] / src / math / ucb / coshf.h
blobfb37bcdee3215574b1f836abb1161c41d4891605
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 // overflow boundary
38 T(RN, 0x1.65a9f8p+6, 0x1.ffffd8p+127, -0x1.f47394p-4, INEXACT)
39 T(RZ, 0x1.65a9f8p+6, 0x1.ffffd8p+127, -0x1.f47394p-4, INEXACT)
40 T(RU, 0x1.65a9f8p+6, 0x1.ffffdap+127, 0x1.c1718ep-1, INEXACT)
41 T(RD, 0x1.65a9f8p+6, 0x1.ffffd8p+127, -0x1.f47394p-4, INEXACT)
42 T(RN, -0x1.65a9f8p+6, 0x1.ffffd8p+127, -0x1.f47394p-4, INEXACT)
43 T(RN, 0x1.65a9fap+6, inf, 0x0p+0, INEXACT|OVERFLOW)
44 T(RN, -0x1.65a9fap+6, inf, 0x0p+0, INEXACT|OVERFLOW)
45 T(RZ, 0x1.65a9fap+6, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
46 T(RU, 0x1.65a9fap+6, inf, 0x0p+0, INEXACT|OVERFLOW)
47 T(RD, 0x1.65a9fap+6, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
48 // coshs(0 or tiny) :=: 1.0
49 T(RN, 0x1p-29, 0x1p+0, -0x1p-36, INEXACT)
50 T(RN, -0x1p-29, 0x1p+0, -0x1p-36, INEXACT)
51 T(RN, 0x1p-126, 0x1p+0, 0x0p+0, INEXACT)
52 T(RN, -0x1p-126, 0x1p+0, 0x0p+0, INEXACT)
53 T(RN, 0x1p-149, 0x1p+0, 0x0p+0, INEXACT)
54 T(RN, -0x1p-149, 0x1p+0, 0x0p+0, INEXACT)
55 T(RN, 0x0p+0, 0x1p+0, 0x0p+0, 0)
56 T(RN, -0x0p+0, 0x1p+0, 0x0p+0, 0)
57 // random arguments between -50,50
58 T(RN, -0x1.adeefcp+3, 0x1.4de32ep+18, -0x1.b42ea2p-2, INEXACT)
59 T(RN, 0x1.1ce3fp+5, 0x1.4c46e6p+50, -0x1.eedd98p-2, INEXACT)
60 T(RN, 0x1.602e1p+5, 0x1.6cd136p+62, -0x1.af2604p-2, INEXACT)
61 T(RN, -0x1.0b246p+5, 0x1.21211ap+47, -0x1.79d648p-5, INEXACT)
62 T(RN, -0x1.b171eep+3, 0x1.749ccp+18, 0x1.b68d9p-2, INEXACT)
63 T(RN, -0x1.f6eff2p+0, 0x1.d16ccp+1, -0x1.268b0ap-5, INEXACT)
64 T(RN, 0x1.ceaa3ep+4, 0x1.a507e4p+40, -0x1.bb6332p-2, INEXACT)
65 T(RN, 0x1.560914p+5, 0x1.9a9aecp+60, -0x1.86baeep-2, INEXACT)
66 T(RN, -0x1.0ce902p+3, 0x1.16e68p+11, 0x1.1fd9dcp-2, INEXACT)
67 T(RN, -0x1.7f35b4p+5, 0x1.13ae52p+68, -0x1.55ec92p-2, INEXACT)
68 // coshs(nan/inf)
69 T(RN, nan, nan, 0x0p+0, 0)
70 T(RN, nan, nan, 0x0p+0, 0)
71 T(RN, inf, inf, 0x0p+0, 0)
72 T(RN, -inf, inf, 0x0p+0, 0)
73 T(RD, inf, inf, 0x0p+0, 0)
74 T(RD, -0x0p+0, 0x1p+0, 0x0p+0, 0)
75 T(RD, -inf, inf, 0x0p+0, 0)
76 T(RD, 0x1p-149, 0x1p+0, 0x0p+0, INEXACT)
77 T(RD, 0x1p-148, 0x1p+0, 0x0p+0, INEXACT)
78 T(RD, 0x1p-128, 0x1p+0, 0x0p+0, INEXACT)
79 T(RD, 0x1p-127, 0x1p+0, 0x0p+0, INEXACT)
80 T(RD, 0x1.fffff8p-127, 0x1p+0, 0x0p+0, INEXACT)
81 T(RD, 0x1.fffffcp-127, 0x1p+0, 0x0p+0, INEXACT)
82 T(RD, 0x1p-126, 0x1p+0, 0x0p+0, INEXACT)
83 T(RD, 0x1.000002p-126, 0x1p+0, 0x0p+0, INEXACT)
84 T(RD, 0x1.000004p-126, 0x1p+0, 0x0p+0, INEXACT)
85 T(RD, 0x1p-125, 0x1p+0, 0x0p+0, INEXACT)
86 T(RD, 0x1p-124, 0x1p+0, 0x0p+0, INEXACT)
87 T(RD, 0x1p-27, 0x1p+0, -0x1p-32, INEXACT)
88 T(RD, 0x1p-12, 0x1p+0, -0x1p-2, INEXACT)
89 T(RD, 0x1p-11, 0x1.000002p+0, -0x1.555556p-26, INEXACT)
90 T(RD, -0x1p-149, 0x1p+0, 0x0p+0, INEXACT)
91 T(RD, -0x1p-148, 0x1p+0, 0x0p+0, INEXACT)
92 T(RD, -0x1p-128, 0x1p+0, 0x0p+0, INEXACT)
93 T(RD, -0x1p-127, 0x1p+0, 0x0p+0, INEXACT)
94 T(RD,-0x1.fffff8p-127, 0x1p+0, 0x0p+0, INEXACT)
95 T(RD,-0x1.fffffcp-127, 0x1p+0, 0x0p+0, INEXACT)
96 T(RD, -0x1p-126, 0x1p+0, 0x0p+0, INEXACT)
97 T(RD,-0x1.000002p-126, 0x1p+0, 0x0p+0, INEXACT)
98 T(RD,-0x1.000004p-126, 0x1p+0, 0x0p+0, INEXACT)
99 T(RD, -0x1p-125, 0x1p+0, 0x0p+0, INEXACT)
100 T(RD, -0x1p-124, 0x1p+0, 0x0p+0, INEXACT)
101 T(RD, -0x1p-27, 0x1p+0, -0x1p-32, INEXACT)
102 T(RD, -0x1p-12, 0x1p+0, -0x1p-2, INEXACT)
103 T(RD, -0x1p-11, 0x1.000002p+0, -0x1.555556p-26, INEXACT)
104 T(RD, 0x1.66p+6, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
105 T(RD, 0x1.634p+9, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
106 T(RD, 0x1p+126, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
107 T(RD, 0x1p+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
108 T(RD, 0x1.fffffcp+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
109 T(RD, 0x1.fffffep+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
110 T(RD, -0x1.66p+6, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
111 T(RD, -0x1.634p+9, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
112 T(RD, -0x1p+126, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
113 T(RD, -0x1p+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
114 T(RD,-0x1.fffffcp+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
115 T(RD,-0x1.fffffep+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
116 T(RD, nan, nan, 0x0p+0, 0)
117 T(RD, nan, nan, 0x0p+0, 0)
118 T(RN, 0x1p-148, 0x1p+0, 0x0p+0, INEXACT)
119 T(RN, 0x1p-128, 0x1p+0, 0x0p+0, INEXACT)
120 T(RN, 0x1p-127, 0x1p+0, 0x0p+0, INEXACT)
121 T(RN, 0x1.fffff8p-127, 0x1p+0, 0x0p+0, INEXACT)
122 T(RN, 0x1.fffffcp-127, 0x1p+0, 0x0p+0, INEXACT)
123 T(RN, 0x1.000002p-126, 0x1p+0, 0x0p+0, INEXACT)
124 T(RN, 0x1.000004p-126, 0x1p+0, 0x0p+0, INEXACT)
125 T(RN, 0x1p-125, 0x1p+0, 0x0p+0, INEXACT)
126 T(RN, 0x1p-124, 0x1p+0, 0x0p+0, INEXACT)
127 T(RN, 0x1p-27, 0x1p+0, -0x1p-32, INEXACT)
128 T(RN, 0x1p-12, 0x1p+0, -0x1p-2, INEXACT)
129 T(RN, 0x1p-11, 0x1.000002p+0, -0x1.555556p-26, INEXACT)
130 T(RN, -0x1p-148, 0x1p+0, 0x0p+0, INEXACT)
131 T(RN, -0x1p-128, 0x1p+0, 0x0p+0, INEXACT)
132 T(RN, -0x1p-127, 0x1p+0, 0x0p+0, INEXACT)
133 T(RN,-0x1.fffff8p-127, 0x1p+0, 0x0p+0, INEXACT)
134 T(RN,-0x1.fffffcp-127, 0x1p+0, 0x0p+0, INEXACT)
135 T(RN,-0x1.000002p-126, 0x1p+0, 0x0p+0, INEXACT)
136 T(RN,-0x1.000004p-126, 0x1p+0, 0x0p+0, INEXACT)
137 T(RN, -0x1p-125, 0x1p+0, 0x0p+0, INEXACT)
138 T(RN, -0x1p-124, 0x1p+0, 0x0p+0, INEXACT)
139 T(RN, -0x1p-27, 0x1p+0, -0x1p-32, INEXACT)
140 T(RN, -0x1p-12, 0x1p+0, -0x1p-2, INEXACT)
141 T(RN, -0x1p-11, 0x1.000002p+0, -0x1.555556p-26, INEXACT)
142 T(RN, 0x1.66p+6, inf, 0x0p+0, INEXACT|OVERFLOW)
143 T(RN, 0x1.634p+9, inf, 0x0p+0, INEXACT|OVERFLOW)
144 T(RN, 0x1p+126, inf, 0x0p+0, INEXACT|OVERFLOW)
145 T(RN, 0x1p+127, inf, 0x0p+0, INEXACT|OVERFLOW)
146 T(RN, 0x1.fffffcp+127, inf, 0x0p+0, INEXACT|OVERFLOW)
147 T(RN, 0x1.fffffep+127, inf, 0x0p+0, INEXACT|OVERFLOW)
148 T(RN, -0x1.66p+6, inf, 0x0p+0, INEXACT|OVERFLOW)
149 T(RN, -0x1.634p+9, inf, 0x0p+0, INEXACT|OVERFLOW)
150 T(RN, -0x1p+126, inf, 0x0p+0, INEXACT|OVERFLOW)
151 T(RN, -0x1p+127, inf, 0x0p+0, INEXACT|OVERFLOW)
152 T(RN,-0x1.fffffcp+127, inf, 0x0p+0, INEXACT|OVERFLOW)
153 T(RN,-0x1.fffffep+127, inf, 0x0p+0, INEXACT|OVERFLOW)
154 T(RU, 0x0p+0, 0x1p+0, 0x0p+0, 0)
155 T(RU, inf, inf, 0x0p+0, 0)
156 T(RU, -0x0p+0, 0x1p+0, 0x0p+0, 0)
157 T(RU, -inf, inf, 0x0p+0, 0)
158 T(RU, 0x1.66p+6, inf, 0x0p+0, INEXACT|OVERFLOW)
159 T(RU, 0x1.634p+9, inf, 0x0p+0, INEXACT|OVERFLOW)
160 T(RU, 0x1p+126, inf, 0x0p+0, INEXACT|OVERFLOW)
161 T(RU, 0x1p+127, inf, 0x0p+0, INEXACT|OVERFLOW)
162 T(RU, 0x1.fffffcp+127, inf, 0x0p+0, INEXACT|OVERFLOW)
163 T(RU, 0x1.fffffep+127, inf, 0x0p+0, INEXACT|OVERFLOW)
164 T(RU, -0x1.66p+6, inf, 0x0p+0, INEXACT|OVERFLOW)
165 T(RU, -0x1.634p+9, inf, 0x0p+0, INEXACT|OVERFLOW)
166 T(RU, -0x1p+126, inf, 0x0p+0, INEXACT|OVERFLOW)
167 T(RU, -0x1p+127, inf, 0x0p+0, INEXACT|OVERFLOW)
168 T(RU,-0x1.fffffcp+127, inf, 0x0p+0, INEXACT|OVERFLOW)
169 T(RU,-0x1.fffffep+127, inf, 0x0p+0, INEXACT|OVERFLOW)
170 T(RU, nan, nan, 0x0p+0, 0)
171 T(RU, nan, nan, 0x0p+0, 0)
172 T(RU, 0x1p-149, 0x1.000002p+0, 0x1p+0, INEXACT)
173 T(RU, 0x1p-148, 0x1.000002p+0, 0x1p+0, INEXACT)
174 T(RU, 0x1p-128, 0x1.000002p+0, 0x1p+0, INEXACT)
175 T(RU, 0x1p-127, 0x1.000002p+0, 0x1p+0, INEXACT)
176 T(RU, 0x1.fffff8p-127, 0x1.000002p+0, 0x1p+0, INEXACT)
177 T(RU, 0x1.fffffcp-127, 0x1.000002p+0, 0x1p+0, INEXACT)
178 T(RU, 0x1p-126, 0x1.000002p+0, 0x1p+0, INEXACT)
179 T(RU, 0x1.000002p-126, 0x1.000002p+0, 0x1p+0, INEXACT)
180 T(RU, 0x1.000004p-126, 0x1.000002p+0, 0x1p+0, INEXACT)
181 T(RU, 0x1p-125, 0x1.000002p+0, 0x1p+0, INEXACT)
182 T(RU, 0x1p-124, 0x1.000002p+0, 0x1p+0, INEXACT)
183 T(RU, 0x1p-27, 0x1.000002p+0, 0x1p+0, INEXACT)
184 T(RU, 0x1p-12, 0x1.000002p+0, 0x1.8p-1, INEXACT)
185 T(RU, 0x1p-11, 0x1.000004p+0, 0x1p+0, INEXACT)
186 T(RU, -0x1p-149, 0x1.000002p+0, 0x1p+0, INEXACT)
187 T(RU, -0x1p-148, 0x1.000002p+0, 0x1p+0, INEXACT)
188 T(RU, -0x1p-128, 0x1.000002p+0, 0x1p+0, INEXACT)
189 T(RU, -0x1p-127, 0x1.000002p+0, 0x1p+0, INEXACT)
190 T(RU,-0x1.fffff8p-127, 0x1.000002p+0, 0x1p+0, INEXACT)
191 T(RU,-0x1.fffffcp-127, 0x1.000002p+0, 0x1p+0, INEXACT)
192 T(RU, -0x1p-126, 0x1.000002p+0, 0x1p+0, INEXACT)
193 T(RU,-0x1.000002p-126, 0x1.000002p+0, 0x1p+0, INEXACT)
194 T(RU,-0x1.000004p-126, 0x1.000002p+0, 0x1p+0, INEXACT)
195 T(RU, -0x1p-125, 0x1.000002p+0, 0x1p+0, INEXACT)
196 T(RU, -0x1p-124, 0x1.000002p+0, 0x1p+0, INEXACT)
197 T(RU, -0x1p-27, 0x1.000002p+0, 0x1p+0, INEXACT)
198 T(RU, -0x1p-12, 0x1.000002p+0, 0x1.8p-1, INEXACT)
199 T(RU, -0x1p-11, 0x1.000004p+0, 0x1p+0, INEXACT)
200 T(RZ, 0x0p+0, 0x1p+0, 0x0p+0, 0)
201 T(RZ, inf, inf, 0x0p+0, 0)
202 T(RZ, -0x0p+0, 0x1p+0, 0x0p+0, 0)
203 T(RZ, -inf, inf, 0x0p+0, 0)
204 T(RZ, 0x1p-149, 0x1p+0, 0x0p+0, INEXACT)
205 T(RZ, 0x1p-148, 0x1p+0, 0x0p+0, INEXACT)
206 T(RZ, 0x1p-128, 0x1p+0, 0x0p+0, INEXACT)
207 T(RZ, 0x1p-127, 0x1p+0, 0x0p+0, INEXACT)
208 T(RZ, 0x1.fffff8p-127, 0x1p+0, 0x0p+0, INEXACT)
209 T(RZ, 0x1.fffffcp-127, 0x1p+0, 0x0p+0, INEXACT)
210 T(RZ, 0x1p-126, 0x1p+0, 0x0p+0, INEXACT)
211 T(RZ, 0x1.000002p-126, 0x1p+0, 0x0p+0, INEXACT)
212 T(RZ, 0x1.000004p-126, 0x1p+0, 0x0p+0, INEXACT)
213 T(RZ, 0x1p-125, 0x1p+0, 0x0p+0, INEXACT)
214 T(RZ, 0x1p-124, 0x1p+0, 0x0p+0, INEXACT)
215 T(RZ, 0x1p-27, 0x1p+0, -0x1p-32, INEXACT)
216 T(RZ, 0x1p-12, 0x1p+0, -0x1p-2, INEXACT)
217 T(RZ, 0x1p-11, 0x1.000002p+0, -0x1.555556p-26, INEXACT)
218 T(RZ, -0x1p-149, 0x1p+0, 0x0p+0, INEXACT)
219 T(RZ, -0x1p-148, 0x1p+0, 0x0p+0, INEXACT)
220 T(RZ, -0x1p-128, 0x1p+0, 0x0p+0, INEXACT)
221 T(RZ, -0x1p-127, 0x1p+0, 0x0p+0, INEXACT)
222 T(RZ,-0x1.fffff8p-127, 0x1p+0, 0x0p+0, INEXACT)
223 T(RZ,-0x1.fffffcp-127, 0x1p+0, 0x0p+0, INEXACT)
224 T(RZ, -0x1p-126, 0x1p+0, 0x0p+0, INEXACT)
225 T(RZ,-0x1.000002p-126, 0x1p+0, 0x0p+0, INEXACT)
226 T(RZ,-0x1.000004p-126, 0x1p+0, 0x0p+0, INEXACT)
227 T(RZ, -0x1p-125, 0x1p+0, 0x0p+0, INEXACT)
228 T(RZ, -0x1p-124, 0x1p+0, 0x0p+0, INEXACT)
229 T(RZ, -0x1p-27, 0x1p+0, -0x1p-32, INEXACT)
230 T(RZ, -0x1p-12, 0x1p+0, -0x1p-2, INEXACT)
231 T(RZ, -0x1p-11, 0x1.000002p+0, -0x1.555556p-26, INEXACT)
232 T(RZ, 0x1.66p+6, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
233 T(RZ, 0x1.634p+9, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
234 T(RZ, 0x1p+126, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
235 T(RZ, 0x1p+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
236 T(RZ, 0x1.fffffcp+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
237 T(RZ, 0x1.fffffep+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
238 T(RZ, -0x1.66p+6, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
239 T(RZ, -0x1.634p+9, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
240 T(RZ, -0x1p+126, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
241 T(RZ, -0x1p+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
242 T(RZ,-0x1.fffffcp+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
243 T(RZ,-0x1.fffffep+127, 0x1.fffffep+127, -0x1p+0, INEXACT|OVERFLOW)
244 T(RZ, nan, nan, 0x0p+0, 0)
245 T(RZ, nan, nan, 0x0p+0, 0)