add generated math tests
[libc-test.git] / src / math / ucb / acos.h
blob632fdc6d1fe26936cd36fd2c836908cf01b7e54e
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 // acosd(+-1) is 0,pi
38 T(RN, 0x1p+0, 0x0p+0, 0x0p+0, 0)
39 T(RN, -0x1p+0, 0x1.921fb54442d18p+1, -0x1.1a6264p-2, INEXACT)
40 // acosd(+-(1 - tiny)) :=: sqrt(2*tiny) or pi-sqrt(2*tiny)
41 T(RN, 0x1.fffffffffffffp-1, 0x1p-26, -0x1.555556p-5, INEXACT)
42 T(RZ, 0x1.fffffffffffffp-1, 0x1p-26, -0x1.555554p-5, INEXACT)
43 T(RU, 0x1.fffffffffffffp-1, 0x1.0000000000001p-26, 0x1.eaaaacp-1, INEXACT)
44 T(RD, 0x1.fffffffffffffp-1, 0x1p-26, -0x1.555556p-5, INEXACT)
45 T(RN, -0x1.fffffffffffffp-1, 0x1.921fb52442d18p+1, -0x1.1a6264p-2, INEXACT)
46 T(RZ, -0x1.fffffffffffffp-1, 0x1.921fb52442d18p+1, -0x1.1a6262p-2, INEXACT)
47 T(RU, -0x1.fffffffffffffp-1, 0x1.921fb52442d19p+1, 0x1.72cedp-1, INEXACT)
48 T(RD, -0x1.fffffffffffffp-1, 0x1.921fb52442d18p+1, -0x1.1a6264p-2, INEXACT)
49 // acosd(tiny) = pi/2-tiny
50 T(RN, 0x1p-44, 0x1.921fb54442c18p+0, -0x1.1a6264p-2, INEXACT)
51 T(RN, -0x1p-44, 0x1.921fb54442e18p+0, -0x1.1a6264p-2, INEXACT)
52 T(RN, 0x1p-67, 0x1.921fb54442d18p+0, -0x1.1a5a64p-2, INEXACT)
53 T(RN, -0x1p-67, 0x1.921fb54442d18p+0, -0x1.1a6a64p-2, INEXACT)
54 T(RN, 0x1p-1022, 0x1.921fb54442d18p+0, -0x1.1a6264p-2, INEXACT)
55 T(RN, -0x1p-1022, 0x1.921fb54442d18p+0, -0x1.1a6264p-2, INEXACT)
56 T(RN, 0x0p+0, 0x1.921fb54442d18p+0, -0x1.1a6264p-2, INEXACT)
57 // some random number between -1 and 1
58 T(RN, -0x1.13284b2b5006dp-2, 0x1.d7c4e61020905p+0, -0x1.25171ap-2, INEXACT)
59 T(RN, 0x1.6ca8dfb825911p-1, 0x1.8e6756e27c366p-1, 0x1.4928b8p-4, INEXACT)
60 T(RN, 0x1.c2ca609de7505p-1, 0x1.f9d748eaf956p-2, 0x1.c4a6d2p-4, INEXACT)
61 T(RN, -0x1.55f11fba96889p-1, 0x1.26abdc68d07aap+1, -0x1.6d356ep-4, INEXACT)
62 T(RN, -0x1.15679e27084ddp-2, 0x1.d85a44ea44fe4p+0, 0x1.7c88dep-4, INEXACT)
63 T(RN, -0x1.41e131b093c41p-5, 0x1.9c2f688eee8abp+0, 0x1.6e23dap-3, INEXACT)
64 T(RN, 0x1.281b0d18455f5p-1, 0x1.e881b1d4eb2a1p-1, -0x1.fb853ep-2, INEXACT)
65 T(RN, 0x1.b5ce34a51b239p-1, 0x1.1713f567a87efp-1, -0x1.bf1bf6p-2, INEXACT)
66 T(RN, -0x1.583481079de4dp-3, 0x1.bd5acbe8fcc59p+0, -0x1.5e7314p-5, INEXACT)
67 T(RN, -0x1.ea8223103b871p-1, 0x1.6ce7d66f628e5p+1, 0x1.b5a774p-6, INEXACT)
68 T(RZ, -0x1.13284b2b5006dp-2, 0x1.d7c4e61020905p+0, -0x1.25171ap-2, INEXACT)
69 T(RZ, 0x1.6ca8dfb825911p-1, 0x1.8e6756e27c365p-1, -0x1.d6dae8p-1, INEXACT)
70 T(RZ, 0x1.c2ca609de7505p-1, 0x1.f9d748eaf955fp-2, -0x1.c76b24p-1, INEXACT)
71 T(RZ, -0x1.55f11fba96889p-1, 0x1.26abdc68d07aap+1, -0x1.6d356cp-4, INEXACT)
72 T(RZ, -0x1.15679e27084ddp-2, 0x1.d85a44ea44fe3p+0, -0x1.d06ee4p-1, INEXACT)
73 T(RZ, -0x1.41e131b093c41p-5, 0x1.9c2f688eee8aap+0, -0x1.a47708p-1, INEXACT)
74 T(RZ, 0x1.281b0d18455f5p-1, 0x1.e881b1d4eb2a1p-1, -0x1.fb853ep-2, INEXACT)
75 T(RZ, 0x1.b5ce34a51b239p-1, 0x1.1713f567a87efp-1, -0x1.bf1bf4p-2, INEXACT)
76 T(RZ, -0x1.583481079de4dp-3, 0x1.bd5acbe8fcc59p+0, -0x1.5e7314p-5, INEXACT)
77 T(RZ, -0x1.ea8223103b871p-1, 0x1.6ce7d66f628e4p+1, -0x1.f252c4p-1, INEXACT)
78 T(RU, -0x1.13284b2b5006dp-2, 0x1.d7c4e61020906p+0, 0x1.6d7474p-1, INEXACT)
79 T(RU, 0x1.6ca8dfb825911p-1, 0x1.8e6756e27c366p-1, 0x1.4928b8p-4, INEXACT)
80 T(RU, 0x1.c2ca609de7505p-1, 0x1.f9d748eaf956p-2, 0x1.c4a6d4p-4, INEXACT)
81 T(RU, -0x1.55f11fba96889p-1, 0x1.26abdc68d07abp+1, 0x1.d25954p-1, INEXACT)
82 T(RU, -0x1.15679e27084ddp-2, 0x1.d85a44ea44fe4p+0, 0x1.7c88dep-4, INEXACT)
83 T(RU, -0x1.41e131b093c41p-5, 0x1.9c2f688eee8abp+0, 0x1.6e23dap-3, INEXACT)
84 T(RU, 0x1.281b0d18455f5p-1, 0x1.e881b1d4eb2a2p-1, 0x1.023d62p-1, INEXACT)
85 T(RU, 0x1.b5ce34a51b239p-1, 0x1.1713f567a87fp-1, 0x1.207206p-1, INEXACT)
86 T(RU, -0x1.583481079de4dp-3, 0x1.bd5acbe8fcc5ap+0, 0x1.ea18dp-1, INEXACT)
87 T(RU, -0x1.ea8223103b871p-1, 0x1.6ce7d66f628e5p+1, 0x1.b5a774p-6, INEXACT)
88 T(RD, -0x1.13284b2b5006dp-2, 0x1.d7c4e61020905p+0, -0x1.25171cp-2, INEXACT)
89 T(RD, 0x1.6ca8dfb825911p-1, 0x1.8e6756e27c365p-1, -0x1.d6daeap-1, INEXACT)
90 T(RD, 0x1.c2ca609de7505p-1, 0x1.f9d748eaf955fp-2, -0x1.c76b26p-1, INEXACT)
91 T(RD, -0x1.55f11fba96889p-1, 0x1.26abdc68d07aap+1, -0x1.6d356ep-4, INEXACT)
92 T(RD, -0x1.15679e27084ddp-2, 0x1.d85a44ea44fe3p+0, -0x1.d06ee6p-1, INEXACT)
93 T(RD, -0x1.41e131b093c41p-5, 0x1.9c2f688eee8aap+0, -0x1.a4770ap-1, INEXACT)
94 T(RD, 0x1.281b0d18455f5p-1, 0x1.e881b1d4eb2a1p-1, -0x1.fb854p-2, INEXACT)
95 T(RD, 0x1.b5ce34a51b239p-1, 0x1.1713f567a87efp-1, -0x1.bf1bf6p-2, INEXACT)
96 T(RD, -0x1.583481079de4dp-3, 0x1.bd5acbe8fcc59p+0, -0x1.5e7316p-5, INEXACT)
97 T(RD, -0x1.ea8223103b871p-1, 0x1.6ce7d66f628e4p+1, -0x1.f252c6p-1, INEXACT)
98 // exception cases
99 T(RN, 0x1.0000000000001p+0, nan, 0x0p+0, INVALID)
100 T(RZ, 0x1.0000000000001p+0, nan, 0x0p+0, INVALID)
101 T(RU, 0x1.0000000000001p+0, nan, 0x0p+0, INVALID)
102 T(RD, 0x1.0000000000001p+0, nan, 0x0p+0, INVALID)
103 T(RN, -0x1.0000000000001p+0, nan, 0x0p+0, INVALID)
104 T(RN, 0x1p+1, nan, 0x0p+0, INVALID)
105 T(RN, 0x1.0000000000001p+16, nan, 0x0p+0, INVALID)
106 T(RN, -0x1.fffffffffffffp+16, nan, 0x0p+0, INVALID)
107 T(RN, nan, nan, 0x0p+0, 0)
108 T(RN, nan, nan, 0x0p+0, 0)
109 T(RZ, nan, nan, 0x0p+0, 0)
110 T(RU, nan, nan, 0x0p+0, 0)
111 T(RD, nan, nan, 0x0p+0, 0)
112 T(RZ, nan, nan, 0x0p+0, 0)
113 T(RU, nan, nan, 0x0p+0, 0)
114 T(RD, nan, nan, 0x0p+0, 0)
115 T(RD, 0x1p+0, 0x0p+0, 0x0p+0, 0)
116 T(RD, 0x1.0000000000002p+0, nan, 0x0p+0, INVALID)
117 T(RD, 0x1p+1, nan, 0x0p+0, INVALID)
118 T(RD, 0x1p+2, nan, 0x0p+0, INVALID)
119 T(RD, 0x1p+1022, nan, 0x0p+0, INVALID)
120 T(RD, 0x1p+1023, nan, 0x0p+0, INVALID)
121 T(RD, 0x1.ffffffffffffep+1023, nan, 0x0p+0, INVALID)
122 T(RD, 0x1.fffffffffffffp+1023, nan, 0x0p+0, INVALID)
123 T(RD, inf, nan, 0x0p+0, INVALID)
124 T(RD, -0x1.0000000000001p+0, nan, 0x0p+0, INVALID)
125 T(RD, -0x1.0000000000002p+0, nan, 0x0p+0, INVALID)
126 T(RD, -0x1p+1, nan, 0x0p+0, INVALID)
127 T(RD, -0x1p+2, nan, 0x0p+0, INVALID)
128 T(RD, -0x1p+1022, nan, 0x0p+0, INVALID)
129 T(RD, -0x1p+1023, nan, 0x0p+0, INVALID)
130 T(RD,-0x1.ffffffffffffep+1023, nan, 0x0p+0, INVALID)
131 T(RD,-0x1.fffffffffffffp+1023, nan, 0x0p+0, INVALID)
132 T(RD, -inf, nan, 0x0p+0, INVALID)
133 T(RD, 0x1.ffffffffffffp-1, 0x1p-24, -0x1.555556p-1, INEXACT)
134 T(RN, 0x1.ffffffffffffp-1, 0x1.0000000000001p-24, 0x1.555556p-2, INEXACT)
135 T(RN, 0x1.0000000000002p+0, nan, 0x0p+0, INVALID)
136 T(RN, 0x1p+2, nan, 0x0p+0, INVALID)
137 T(RN, 0x1p+1022, nan, 0x0p+0, INVALID)
138 T(RN, 0x1p+1023, nan, 0x0p+0, INVALID)
139 T(RN, 0x1.ffffffffffffep+1023, nan, 0x0p+0, INVALID)
140 T(RN, 0x1.fffffffffffffp+1023, nan, 0x0p+0, INVALID)
141 T(RN, inf, nan, 0x0p+0, INVALID)
142 T(RN, -0x1.0000000000002p+0, nan, 0x0p+0, INVALID)
143 T(RN, -0x1p+1, nan, 0x0p+0, INVALID)
144 T(RN, -0x1p+2, nan, 0x0p+0, INVALID)
145 T(RN, -0x1p+1022, nan, 0x0p+0, INVALID)
146 T(RN, -0x1p+1023, nan, 0x0p+0, INVALID)
147 T(RN,-0x1.ffffffffffffep+1023, nan, 0x0p+0, INVALID)
148 T(RN,-0x1.fffffffffffffp+1023, nan, 0x0p+0, INVALID)
149 T(RN, -inf, nan, 0x0p+0, INVALID)
150 T(RU, 0x1p+0, 0x0p+0, 0x0p+0, 0)
151 T(RU, 0x1.0000000000002p+0, nan, 0x0p+0, INVALID)
152 T(RU, 0x1p+1, nan, 0x0p+0, INVALID)
153 T(RU, 0x1p+2, nan, 0x0p+0, INVALID)
154 T(RU, 0x1p+1022, nan, 0x0p+0, INVALID)
155 T(RU, 0x1p+1023, nan, 0x0p+0, INVALID)
156 T(RU, 0x1.ffffffffffffep+1023, nan, 0x0p+0, INVALID)
157 T(RU, 0x1.fffffffffffffp+1023, nan, 0x0p+0, INVALID)
158 T(RU, inf, nan, 0x0p+0, INVALID)
159 T(RU, -0x1.0000000000001p+0, nan, 0x0p+0, INVALID)
160 T(RU, -0x1.0000000000002p+0, nan, 0x0p+0, INVALID)
161 T(RU, -0x1p+1, nan, 0x0p+0, INVALID)
162 T(RU, -0x1p+2, nan, 0x0p+0, INVALID)
163 T(RU, -0x1p+1022, nan, 0x0p+0, INVALID)
164 T(RU, -0x1p+1023, nan, 0x0p+0, INVALID)
165 T(RU,-0x1.ffffffffffffep+1023, nan, 0x0p+0, INVALID)
166 T(RU,-0x1.fffffffffffffp+1023, nan, 0x0p+0, INVALID)
167 T(RU, -inf, nan, 0x0p+0, INVALID)
168 T(RU, 0x1.fffffffffffe7p-1, 0x1.4000000000002p-24, 0x1.655556p-1, INEXACT)
169 T(RU, 0x1.ffffffffffffp-1, 0x1.0000000000001p-24, 0x1.555556p-2, INEXACT)
170 T(RZ, 0x1p+0, 0x0p+0, 0x0p+0, 0)
171 T(RZ, 0x1.0000000000002p+0, nan, 0x0p+0, INVALID)
172 T(RZ, 0x1p+1, nan, 0x0p+0, INVALID)
173 T(RZ, 0x1p+2, nan, 0x0p+0, INVALID)
174 T(RZ, 0x1p+1022, nan, 0x0p+0, INVALID)
175 T(RZ, 0x1p+1023, nan, 0x0p+0, INVALID)
176 T(RZ, 0x1.ffffffffffffep+1023, nan, 0x0p+0, INVALID)
177 T(RZ, 0x1.fffffffffffffp+1023, nan, 0x0p+0, INVALID)
178 T(RZ, inf, nan, 0x0p+0, INVALID)
179 T(RZ, -0x1.0000000000001p+0, nan, 0x0p+0, INVALID)
180 T(RZ, -0x1.0000000000002p+0, nan, 0x0p+0, INVALID)
181 T(RZ, -0x1p+1, nan, 0x0p+0, INVALID)
182 T(RZ, -0x1p+2, nan, 0x0p+0, INVALID)
183 T(RZ, -0x1p+1022, nan, 0x0p+0, INVALID)
184 T(RZ, -0x1p+1023, nan, 0x0p+0, INVALID)
185 T(RZ,-0x1.ffffffffffffep+1023, nan, 0x0p+0, INVALID)
186 T(RZ,-0x1.fffffffffffffp+1023, nan, 0x0p+0, INVALID)
187 T(RZ, -inf, nan, 0x0p+0, INVALID)
188 T(RZ, 0x1.fffffffffffe7p-1, 0x1.4000000000001p-24, -0x1.355554p-2, INEXACT)
189 T(RZ, 0x1.ffffffffffffp-1, 0x1p-24, -0x1.555554p-1, INEXACT)