52{
53
54
55
56 static const double atan_jby256[ 241] = {
57 6.24188099959573430842e-02,
58 6.63088949198234745008e-02,
59 7.01969710718705064423e-02,
60 7.40829225490337306415e-02,
61 7.79666338315423007588e-02,
62 8.18479898030765457007e-02,
63 8.57268757707448092464e-02,
64 8.96031774848717321724e-02,
65 9.34767811585894559112e-02,
66 9.73475734872236708739e-02,
67 1.01215441667466668485e-01,
68 1.05080273416329528224e-01,
69 1.08941956989865793015e-01,
70 1.12800381201659388752e-01,
71 1.16655435441069349478e-01,
72 1.20507009691224548087e-01,
73 1.24354994546761424279e-01,
74 1.28199281231298117811e-01,
75 1.32039761614638734288e-01,
76 1.35876328229701304195e-01,
77 1.39708874289163620386e-01,
78 1.43537293701821222491e-01,
79 1.47361481088651630200e-01,
80 1.51181331798580037562e-01,
81 1.54996741923940972718e-01,
82 1.58807608315631065832e-01,
83 1.62613828597948567589e-01,
84 1.66415301183114927586e-01,
85 1.70211925285474380276e-01,
86 1.74003600935367680469e-01,
87 1.77790228992676047071e-01,
88 1.81571711160032150945e-01,
89 1.85347949995694760705e-01,
90 1.89118848926083965578e-01,
91 1.92884312257974643856e-01,
92 1.96644245190344985064e-01,
93 2.00398553825878511514e-01,
94 2.04147145182116990236e-01,
95 2.07889927202262986272e-01,
96 2.11626808765629753628e-01,
97 2.15357699697738047551e-01,
98 2.19082510780057748701e-01,
99 2.22801153759394493514e-01,
100 2.26513541356919617664e-01,
101 2.30219587276843717927e-01,
102 2.33919206214733416127e-01,
103 2.37612313865471241892e-01,
104 2.41298826930858800743e-01,
105 2.44978663126864143473e-01,
106 2.48651741190513253521e-01,
107 2.52317980886427151166e-01,
108 2.55977303013005474952e-01,
109 2.59629629408257511791e-01,
110 2.63274882955282396590e-01,
111 2.66912987587400396539e-01,
112 2.70543868292936529052e-01,
113 2.74167451119658789338e-01,
114 2.77783663178873208022e-01,
115 2.81392432649178403370e-01,
116 2.84993688779881237938e-01,
117 2.88587361894077354396e-01,
118 2.92173383391398755471e-01,
119 2.95751685750431536626e-01,
120 2.99322202530807379706e-01,
121 3.02884868374971361060e-01,
122 3.06439619009630070945e-01,
123 3.09986391246883430384e-01,
124 3.13525122985043869228e-01,
125 3.17055753209146973237e-01,
126 3.20578221991156986359e-01,
127 3.24092470489871664618e-01,
128 3.27598440950530811477e-01,
129 3.31096076704132047386e-01,
130 3.34585322166458920545e-01,
131 3.38066122836825466713e-01,
132 3.41538425296541714449e-01,
133 3.45002177207105076295e-01,
134 3.48457327308122011278e-01,
135 3.51903825414964732676e-01,
136 3.55341622416168290144e-01,
137 3.58770670270572189509e-01,
138 3.62190922004212156882e-01,
139 3.65602331706966821034e-01,
140 3.69004854528964421068e-01,
141 3.72398446676754202311e-01,
142 3.75783065409248884237e-01,
143 3.79158669033441808605e-01,
144 3.82525216899905096124e-01,
145 3.85882669398073752109e-01,
146 3.89230987951320717144e-01,
147 3.92570135011828580396e-01,
148 3.95900074055262896078e-01,
149 3.99220769575252543149e-01,
150 4.02532187077682512832e-01,
151 4.05834293074804064450e-01,
152 4.09127055079168300278e-01,
153 4.12410441597387267265e-01,
154 4.15684422123729413467e-01,
155 4.18948967133552840902e-01,
156 4.22204048076583571270e-01,
157 4.25449637370042266227e-01,
158 4.28685708391625730496e-01,
159 4.31912235472348193799e-01,
160 4.35129193889246812521e-01,
161 4.38336559857957774877e-01,
162 4.41534310525166673322e-01,
163 4.44722423960939305942e-01,
164 4.47900879150937292206e-01,
165 4.51069655988523443568e-01,
166 4.54228735266762495559e-01,
167 4.57378098670320809571e-01,
168 4.60517728767271039558e-01,
169 4.63647609000806093515e-01,
170 4.66767723680866497560e-01,
171 4.69878057975686880265e-01,
172 4.72978597903265574054e-01,
173 4.76069330322761219421e-01,
174 4.79150242925822533735e-01,
175 4.82221324227853687105e-01,
176 4.85282563559221225002e-01,
177 4.88333951056405479729e-01,
178 4.91375477653101910835e-01,
179 4.94407135071275316562e-01,
180 4.97428915812172245392e-01,
181 5.00440813147294050189e-01,
182 5.03442821109336358099e-01,
183 5.06434934483096732549e-01,
184 5.09417148796356245022e-01,
185 5.12389460310737621107e-01,
186 5.15351866012543347040e-01,
187 5.18304363603577900044e-01,
188 5.21246951491958210312e-01,
189 5.24179628782913242802e-01,
190 5.27102395269579471204e-01,
191 5.30015251423793132268e-01,
192 5.32918198386882147055e-01,
193 5.35811237960463593311e-01,
194 5.38694372597246617929e-01,
195 5.41567605391844897333e-01,
196 5.44430940071603086672e-01,
197 5.47284380987436924748e-01,
198 5.50127933104692989907e-01,
199 5.52961601994028217888e-01,
200 5.55785393822313511514e-01,
201 5.58599315343562330405e-01,
202 5.61403373889889367732e-01,
203 5.64197577362497537656e-01,
204 5.66981934222700489912e-01,
205 5.69756453482978431069e-01,
206 5.72521144698072359525e-01,
207 5.75276017956117824426e-01,
208 5.78021083869819540801e-01,
209 5.80756353567670302596e-01,
210 5.83481838685214859730e-01,
211 5.86197551356360535557e-01,
212 5.88903504204738026395e-01,
213 5.91599710335111383941e-01,
214 5.94286183324841177367e-01,
215 5.96962937215401501234e-01,
216 5.99629986503951384336e-01,
217 6.02287346134964152178e-01,
218 6.04935031491913965951e-01,
219 6.07573058389022313541e-01,
220 6.10201443063065118722e-01,
221 6.12820202165241245673e-01,
222 6.15429352753104952356e-01,
223 6.18028912282561737612e-01,
224 6.20618898599929469384e-01,
225 6.23199329934065904268e-01,
226 6.25770224888563042498e-01,
227 6.28331602434009650615e-01,
228 6.30883481900321840818e-01,
229 6.33425882969144482537e-01,
230 6.35958825666321447834e-01,
231 6.38482330354437466191e-01,
232 6.40996417725432032775e-01,
233 6.43501108793284370968e-01,
234 6.45996424886771558604e-01,
235 6.48482387642300484032e-01,
236 6.50959018996812410762e-01,
237 6.53426341180761927063e-01,
238 6.55884376711170835605e-01,
239 6.58333148384755983962e-01,
240 6.60772679271132590273e-01,
241 6.63202992706093175102e-01,
242 6.65624112284960989250e-01,
243 6.68036061856020157990e-01,
244 6.70438865514021320458e-01,
245 6.72832547593763097282e-01,
246 6.75217132663749830535e-01,
247 6.77592645519925151909e-01,
248 6.79959111179481823228e-01,
249 6.82316554874748071313e-01,
250 6.84665002047148862907e-01,
251 6.87004478341244895212e-01,
252 6.89335009598845749323e-01,
253 6.91656621853199760075e-01,
254 6.93969341323259825138e-01,
255 6.96273194408023488045e-01,
256 6.98568207680949848637e-01,
257 7.00854407884450081312e-01,
258 7.03131821924453670469e-01,
259 7.05400476865049030906e-01,
260 7.07660399923197958039e-01,
261 7.09911618463524796141e-01,
262 7.12154159993178659249e-01,
263 7.14388052156768926793e-01,
264 7.16613322731374569052e-01,
265 7.18829999621624415873e-01,
266 7.21038110854851588272e-01,
267 7.23237684576317874097e-01,
268 7.25428749044510712274e-01,
269 7.27611332626510676214e-01,
270 7.29785463793429123314e-01,
271 7.31951171115916565668e-01,
272 7.34108483259739652560e-01,
273 7.36257428981428097003e-01,
274 7.38398037123989547936e-01,
275 7.40530336612692630105e-01,
276 7.42654356450917929600e-01,
277 7.44770125716075148681e-01,
278 7.46877673555587429099e-01,
279 7.48977029182941400620e-01,
280 7.51068221873802288613e-01,
281 7.53151280962194302759e-01,
282 7.55226235836744863583e-01,
283 7.57293115936992444759e-01,
284 7.59351950749757920178e-01,
285 7.61402769805578416573e-01,
286 7.63445602675201784315e-01,
287 7.65480478966144461950e-01,
288 7.67507428319308182552e-01,
289 7.69526480405658186434e-01,
290 7.71537664922959498526e-01,
291 7.73541011592573490852e-01,
292 7.75536550156311621507e-01,
293 7.77524310373347682379e-01,
294 7.79504322017186335181e-01,
295 7.81476614872688268854e-01,
296 7.83441218733151756304e-01,
297 7.85398163397448278999e-01};
298
299
300
301 static double pi = 3.1415926535897932e+00,
302 piby2 = 1.5707963267948966e+00,
303 piby4 = 7.8539816339744831e-01,
304 three_piby4 = 2.3561944901923449e+00;
305
306 double u,
v, vbyu,
q,
s, uu,
r;
307 unsigned int swap_vu,
index, xzero, yzero, xnan, ynan, xinf, yinf;
308 int xexp, yexp, diffexp;
309
312
313
314
315 unsigned long long ux,
aux, xneg, uy, auy, yneg;
316
319 aux = ux & ~SIGNBIT_DP64;
320 auy = uy & ~SIGNBIT_DP64;
326 yzero = (auy == 0);
331
332 diffexp = yexp - xexp;
333
334
335
336 if (xnan)
337 {
338 unsigned int ufx;
342 }
343 else if (ynan)
344 {
345 unsigned int ufy;
349 }
350 else if (yzero)
351 {
352
353 if (xneg)
354 {
357 }
358 else return (
float)
y;
359 }
360 else if (xzero)
361 {
362
363 if (yneg)
return valf_with_flags((
float)-piby2,
AMD_F_INEXACT);
365 }
366
367 if (diffexp > 26)
368 {
369
370 if (yneg)
return valf_with_flags((
float)-piby2,
AMD_F_INEXACT);
372 }
373 else if (diffexp < -13 && (!xneg))
374 {
375
376
377 if (diffexp < -150)
378 {
379 if (yneg)
381 else
383 }
384 else
385 {
386 if (diffexp < -126)
387 {
388
389 y = scaleDouble_1(
y, 100);
391
393 scaleDownDouble(uy, 100, &uy);
397 else
399 }
400 else
401 return (
float)(
y /
x);
402 }
403 }
404 else if (diffexp < -26 && xneg)
405 {
406
409 }
410 else if (yinf && xinf)
411 {
412
413
414 if (xneg)
415 {
416 if (yneg)
return valf_with_flags((
float)-three_piby4,
AMD_F_INEXACT);
417 else return valf_with_flags((
float)three_piby4,
AMD_F_INEXACT);
418 }
419 else
420 {
421 if (yneg)
return valf_with_flags((
float)-piby4,
AMD_F_INEXACT);
423 }
424 }
425
426
427
431
432
433
435 if (swap_vu) { uu =
u;
u =
v;
v = uu; }
437
438 if (vbyu > 0.0625)
439 {
440
441
444
445
446
448 q = atan_jby256[
index-16] +
r -
r*
s*0.33333333333224095522;
449 }
450 else if (vbyu < 1.e-4)
451 {
453 }
454 else
455 {
456
457
460 vbyu*
s*(0.33333333333333170500 -
461 s*(0.19999999999393223405 -
462 s*0.14285713561807169030));
463 }
464
465
466
467 if (swap_vu) {
q = piby2 -
q;}
468 if (xneg) {
q =
pi -
q;}
471}
float __cdecl _handle_errorf(char *fname, int opcode, unsigned long long value, int type, int flags, int error, float arg1, float arg2, int nargs)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble q
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
#define GET_BITS_SP32(x, ux)
#define EXPSHIFTBITS_DP64
#define GET_BITS_DP64(x, ux)
#define PUT_BITS_DP64(ux, x)