fix ulp check in sincosf
[libc-test.git] / src / math / ucb / tanf.h
blob7059ddfd3110859ee321eae78ad7471c812c28a8
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 // tans(+-max)
38 // tans(tiny) is tiny
39 T(RN, 0x1p-29, 0x1p-29, -0x1.555556p-37, INEXACT)
40 T(RN, -0x1p-29, -0x1p-29, 0x1.555556p-37, INEXACT)
41 T(RN, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
42 T(RN, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
43 T(RN, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
44 T(RN, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
45 // tans(+-0) is +-0.0
46 T(RN, 0x0p+0, 0x0p+0, 0x0p+0, 0)
47 T(RN, -0x0p+0, -0x0p+0, 0x0p+0, 0)
48 T(RZ, 0x0p+0, 0x0p+0, 0x0p+0, 0)
49 T(RZ, -0x0p+0, -0x0p+0, 0x0p+0, 0)
50 T(RU, 0x0p+0, 0x0p+0, 0x0p+0, 0)
51 T(RU, -0x0p+0, -0x0p+0, 0x0p+0, 0)
52 T(RD, 0x0p+0, 0x0p+0, 0x0p+0, 0)
53 T(RD, -0x0p+0, -0x0p+0, 0x0p+0, 0)
54 // tans(nan or inf) is nan
55 T(RN, inf, nan, 0x0p+0, INVALID)
56 T(RN, -inf, nan, 0x0p+0, INVALID)
57 T(RN, nan, nan, 0x0p+0, 0)
58 T(RN, nan, nan, 0x0p+0, 0)
59 T(RD, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
60 T(RD, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
61 T(RD, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
62 T(RD, 0x1.fffff6p-126, 0x1.fffff6p-126, 0x0p+0, INEXACT)
63 T(RD, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
64 T(RD, 0x1.000006p-125, 0x1.000006p-125, 0x0p+0, INEXACT)
65 T(RD, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
66 T(RD, 0x1.8p-27, 0x1.8p-27, -0x1.2p-31, INEXACT)
67 T(RD, 0x1p-26, 0x1p-26, -0x1.555556p-31, INEXACT)
68 T(RD, 0x1p-12, 0x1p-12, -0x1.555556p-3, INEXACT)
69 T(RD, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
70 T(RD, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
71 T(RD, 0x1.2p-146, 0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
72 T(RD, 0x1p-128, 0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
73 T(RD, 0x1p-127, 0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
74 T(RD, 0x1.fffff8p-127, 0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
75 T(RD, 0x1.fffffcp-127, 0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
76 T(RD, nan, nan, 0x0p+0, 0)
77 T(RD, nan, nan, 0x0p+0, 0)
78 T(RD, inf, nan, 0x0p+0, INVALID)
79 T(RD, -inf, nan, 0x0p+0, INVALID)
80 T(RD, -0x1p-126,-0x1.000002p-126, -0x1p+0, INEXACT)
81 T(RD,-0x1.000002p-126,-0x1.000004p-126, -0x1p+0, INEXACT)
82 T(RD,-0x1.000004p-126,-0x1.000006p-126, -0x1p+0, INEXACT)
83 T(RD, -0x1p-125,-0x1.000002p-125, -0x1p+0, INEXACT)
84 T(RD, -0x1p-124,-0x1.000002p-124, -0x1p+0, INEXACT)
85 T(RD, -0x1.8p-27, -0x1.800002p-27, -0x1p+0, INEXACT)
86 T(RD, -0x1p-26, -0x1.000002p-26, -0x1p+0, INEXACT)
87 T(RD, -0x1p-12, -0x1.000002p-12, -0x1.aaaaaap-1, INEXACT)
88 T(RD, -0x1p-149, -0x1p-148, -0x1p+0, INEXACT|UNDERFLOW)
89 T(RD, -0x1p-148, -0x1.8p-148, -0x1p+0, INEXACT|UNDERFLOW)
90 T(RD, -0x1p-128,-0x1.000008p-128, -0x1p+0, INEXACT|UNDERFLOW)
91 T(RD, -0x1p-127,-0x1.000004p-127, -0x1p+0, INEXACT|UNDERFLOW)
92 T(RD,-0x1.fffff8p-127,-0x1.fffffcp-127, -0x1p+0, INEXACT|UNDERFLOW)
93 T(RD,-0x1.fffffcp-127, -0x1p-126, -0x1p+0, INEXACT|UNDERFLOW)
94 T(RN, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
95 T(RN, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
96 T(RN, 0x1.fffff6p-126, 0x1.fffff6p-126, 0x0p+0, INEXACT)
97 T(RN, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
98 T(RN, 0x1.000006p-125, 0x1.000006p-125, 0x0p+0, INEXACT)
99 T(RN, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
100 T(RN, 0x1.8p-27, 0x1.8p-27, -0x1.2p-31, INEXACT)
101 T(RN, 0x1p-26, 0x1p-26, -0x1.555556p-31, INEXACT)
102 T(RN, 0x1p-12, 0x1p-12, -0x1.555556p-3, INEXACT)
103 T(RN,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
104 T(RN,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
105 T(RN,-0x1.fffff6p-126,-0x1.fffff6p-126, 0x0p+0, INEXACT)
106 T(RN, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
107 T(RN,-0x1.000006p-125,-0x1.000006p-125, 0x0p+0, INEXACT)
108 T(RN, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
109 T(RN, -0x1.8p-27, -0x1.8p-27, 0x1.2p-31, INEXACT)
110 T(RN, -0x1p-26, -0x1p-26, 0x1.555556p-31, INEXACT)
111 T(RN, -0x1p-12, -0x1p-12, 0x1.555556p-3, INEXACT)
112 T(RN, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
113 T(RN, 0x1.2p-146, 0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
114 T(RN, 0x1p-128, 0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
115 T(RN, 0x1p-127, 0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
116 T(RN, 0x1.fffff8p-127, 0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
117 T(RN, 0x1.fffffcp-127, 0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
118 T(RN, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
119 T(RN, -0x1.2p-146, -0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
120 T(RN, -0x1p-128, -0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
121 T(RN, -0x1p-127, -0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
122 T(RN,-0x1.fffff8p-127,-0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
123 T(RN,-0x1.fffffcp-127,-0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
124 T(RU, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
125 T(RU,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
126 T(RU,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
127 T(RU,-0x1.fffff6p-126,-0x1.fffff6p-126, 0x0p+0, INEXACT)
128 T(RU, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
129 T(RU,-0x1.000006p-125,-0x1.000006p-125, 0x0p+0, INEXACT)
130 T(RU, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
131 T(RU, -0x1.8p-27, -0x1.8p-27, 0x1.2p-31, INEXACT)
132 T(RU, -0x1p-26, -0x1p-26, 0x1.555556p-31, INEXACT)
133 T(RU, -0x1p-12, -0x1p-12, 0x1.555556p-3, INEXACT)
134 T(RU, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
135 T(RU, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
136 T(RU, -0x1.2p-146, -0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
137 T(RU, -0x1p-128, -0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
138 T(RU, -0x1p-127, -0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
139 T(RU,-0x1.fffff8p-127,-0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
140 T(RU,-0x1.fffffcp-127,-0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
141 T(RU, nan, nan, 0x0p+0, 0)
142 T(RU, nan, nan, 0x0p+0, 0)
143 T(RU, inf, nan, 0x0p+0, INVALID)
144 T(RU, -inf, nan, 0x0p+0, INVALID)
145 T(RU, 0x1p-126, 0x1.000002p-126, 0x1p+0, INEXACT)
146 T(RU, 0x1.000002p-126, 0x1.000004p-126, 0x1p+0, INEXACT)
147 T(RU, 0x1.000004p-126, 0x1.000006p-126, 0x1p+0, INEXACT)
148 T(RU, 0x1p-125, 0x1.000002p-125, 0x1p+0, INEXACT)
149 T(RU, 0x1p-124, 0x1.000002p-124, 0x1p+0, INEXACT)
150 T(RU, 0x1.8p-27, 0x1.800002p-27, 0x1p+0, INEXACT)
151 T(RU, 0x1p-26, 0x1.000002p-26, 0x1p+0, INEXACT)
152 T(RU, 0x1p-12, 0x1.000002p-12, 0x1.aaaaaap-1, INEXACT)
153 T(RU, 0x1p-149, 0x1p-148, 0x1p+0, INEXACT|UNDERFLOW)
154 T(RU, 0x1p-148, 0x1.8p-148, 0x1p+0, INEXACT|UNDERFLOW)
155 T(RU, 0x1p-128, 0x1.000008p-128, 0x1p+0, INEXACT|UNDERFLOW)
156 T(RU, 0x1p-127, 0x1.000004p-127, 0x1p+0, INEXACT|UNDERFLOW)
157 T(RU, 0x1.fffff8p-127, 0x1.fffffcp-127, 0x1p+0, INEXACT|UNDERFLOW)
158 T(RU, 0x1.fffffcp-127, 0x1p-126, 0x1p+0, INEXACT|UNDERFLOW)
159 T(RZ, 0x1p-126, 0x1p-126, 0x0p+0, INEXACT)
160 T(RZ, 0x1.000002p-126, 0x1.000002p-126, 0x0p+0, INEXACT)
161 T(RZ, 0x1.000004p-126, 0x1.000004p-126, 0x0p+0, INEXACT)
162 T(RZ, 0x1.fffff6p-126, 0x1.fffff6p-126, 0x0p+0, INEXACT)
163 T(RZ, 0x1p-125, 0x1p-125, 0x0p+0, INEXACT)
164 T(RZ, 0x1.000006p-125, 0x1.000006p-125, 0x0p+0, INEXACT)
165 T(RZ, 0x1p-124, 0x1p-124, 0x0p+0, INEXACT)
166 T(RZ, 0x1.8p-27, 0x1.8p-27, -0x1.2p-31, INEXACT)
167 T(RZ, 0x1p-26, 0x1p-26, -0x1.555556p-31, INEXACT)
168 T(RZ, 0x1p-12, 0x1p-12, -0x1.555556p-3, INEXACT)
169 T(RZ, -0x1p-126, -0x1p-126, 0x0p+0, INEXACT)
170 T(RZ,-0x1.000002p-126,-0x1.000002p-126, 0x0p+0, INEXACT)
171 T(RZ,-0x1.000004p-126,-0x1.000004p-126, 0x0p+0, INEXACT)
172 T(RZ,-0x1.fffff6p-126,-0x1.fffff6p-126, 0x0p+0, INEXACT)
173 T(RZ, -0x1p-125, -0x1p-125, 0x0p+0, INEXACT)
174 T(RZ,-0x1.000006p-125,-0x1.000006p-125, 0x0p+0, INEXACT)
175 T(RZ, -0x1p-124, -0x1p-124, 0x0p+0, INEXACT)
176 T(RZ, -0x1.8p-27, -0x1.8p-27, 0x1.2p-31, INEXACT)
177 T(RZ, -0x1p-26, -0x1p-26, 0x1.555556p-31, INEXACT)
178 T(RZ, -0x1p-12, -0x1p-12, 0x1.555556p-3, INEXACT)
179 T(RZ, 0x1p-149, 0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
180 T(RZ, 0x1p-148, 0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
181 T(RZ, 0x1.2p-146, 0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
182 T(RZ, 0x1p-128, 0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
183 T(RZ, 0x1p-127, 0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
184 T(RZ, 0x1.fffff8p-127, 0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
185 T(RZ, 0x1.fffffcp-127, 0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
186 T(RZ, -0x1p-149, -0x1p-149, 0x0p+0, INEXACT|UNDERFLOW)
187 T(RZ, -0x1p-148, -0x1p-148, 0x0p+0, INEXACT|UNDERFLOW)
188 T(RZ, -0x1.2p-146, -0x1.2p-146, 0x0p+0, INEXACT|UNDERFLOW)
189 T(RZ, -0x1p-128, -0x1p-128, 0x0p+0, INEXACT|UNDERFLOW)
190 T(RZ, -0x1p-127, -0x1p-127, 0x0p+0, INEXACT|UNDERFLOW)
191 T(RZ,-0x1.fffff8p-127,-0x1.fffff8p-127, 0x0p+0, INEXACT|UNDERFLOW)
192 T(RZ,-0x1.fffffcp-127,-0x1.fffffcp-127, 0x0p+0, INEXACT|UNDERFLOW)
193 T(RZ, nan, nan, 0x0p+0, 0)
194 T(RZ, nan, nan, 0x0p+0, 0)
195 T(RZ, inf, nan, 0x0p+0, INVALID)
196 T(RZ, -inf, nan, 0x0p+0, INVALID)