1b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//===-- mulxc3_test.c - Test __mulxc3 -------------------------------------===//
2b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//
3b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//                     The LLVM Compiler Infrastructure
4b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//
59ad441ffec97db647fee3725b3424284fb913e14Howard Hinnant// This file is dual licensed under the MIT and the University of Illinois Open
69ad441ffec97db647fee3725b3424284fb913e14Howard Hinnant// Source Licenses. See LICENSE.TXT for details.
7b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//
8b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//===----------------------------------------------------------------------===//
9b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//
10b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar// This file tests __mulxc3 for the compiler_rt library.
11b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//
12b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//===----------------------------------------------------------------------===//
13b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
14b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#if !_ARCH_PPC
15b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
16b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#include "int_lib.h"
17b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#include <math.h>
18b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#include <complex.h>
19b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#include <stdio.h>
20b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
21b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar// Returns: the product of a + ib and c + id
22b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
23b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarlong double _Complex
24b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar__mulxc3(long double __a, long double __b, long double __c, long double __d);
25b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
26b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarenum {zero, non_zero, inf, NaN, non_zero_nan};
27b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
28b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarint
29b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarclassify(long double _Complex x)
30b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar{
31b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    if (x == 0)
32b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        return zero;
33b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    if (isinf(creall(x)) || isinf(cimagl(x)))
34b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        return inf;
35b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    if (isnan(creall(x)) && isnan(cimagl(x)))
36b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        return NaN;
37b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    if (isnan(creall(x)))
38b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {
39b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        if (cimagl(x) == 0)
40b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            return NaN;
41b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        return non_zero_nan;
42b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    }
43b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    if (isnan(cimagl(x)))
44b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {
45b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        if (creall(x) == 0)
46b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            return NaN;
47b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        return non_zero_nan;
48b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    }
49b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    return non_zero;
50b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar}
51b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
52b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarint test__mulxc3(long double a, long double b, long double c, long double d)
53b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar{
54b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    long double _Complex r = __mulxc3(a, b, c, d);
55b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//     printf("test__mulxc3(%Lf, %Lf, %Lf, %Lf) = %Lf + I%Lf\n",
56b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar//             a, b, c, d, creall(r), cimagl(r));
57b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar	long double _Complex dividend;
58b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar	long double _Complex divisor;
59b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
60b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar	__real__ dividend = a;
61b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar	__imag__ dividend = b;
62b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar	__real__ divisor = c;
63b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar	__imag__ divisor = d;
64b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
65b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    switch (classify(dividend))
66b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {
67b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    case zero:
68b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        switch (classify(divisor))
69b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        {
70b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case zero:
71b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != zero)
72b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
73b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
74b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero:
75b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != zero)
76b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
77b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
78b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case inf:
79b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
80b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
81b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
82b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case NaN:
83b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
84b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
85b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
86b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero_nan:
87b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
88b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
89b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
90b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        }
91b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        break;
92b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    case non_zero:
93b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        switch (classify(divisor))
94b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        {
95b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case zero:
96b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != zero)
97b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
98b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
99b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero:
100b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != non_zero)
101b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
102b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (r != a * c - b * d + _Complex_I*(a * d + b * c))
103b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
104b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
105b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case inf:
106b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != inf)
107b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
108b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
109b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case NaN:
110b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
111b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
112b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
113b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero_nan:
114b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
115b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
116b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
117b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        }
118b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        break;
119b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    case inf:
120b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        switch (classify(divisor))
121b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        {
122b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case zero:
123b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
124b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
125b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
126b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero:
127b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != inf)
128b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
129b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
130b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case inf:
131b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != inf)
132b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
133b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
134b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case NaN:
135b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
136b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
137b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
138b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero_nan:
139b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != inf)
140b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
141b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
142b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        }
143b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        break;
144b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    case NaN:
145b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        switch (classify(divisor))
146b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        {
147b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case zero:
148b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
149b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
150b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
151b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero:
152b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
153b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
154b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
155b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case inf:
156b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
157b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
158b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
159b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case NaN:
160b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
161b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
162b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
163b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero_nan:
164b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
165b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
166b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
167b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        }
168b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        break;
169b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    case non_zero_nan:
170b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        switch (classify(divisor))
171b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        {
172b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case zero:
173b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
174b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
175b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
176b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero:
177b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
178b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
179b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
180b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case inf:
181b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != inf)
182b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
183b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
184b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case NaN:
185b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
186b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
187b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
188b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        case non_zero_nan:
189b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (classify(r) != NaN)
190b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
191b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            break;
192b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        }
193b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        break;
194b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    }
195b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
196b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    return 0;
197b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar}
198b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
199b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarlong double x[][2] =
200b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar{
201b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    { 1.e-6,  1.e-6},
202b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1.e-6,  1.e-6},
203b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1.e-6, -1.e-6},
204b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    { 1.e-6, -1.e-6},
205b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
206b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    { 1.e+6,  1.e-6},
207b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1.e+6,  1.e-6},
208b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1.e+6, -1.e-6},
209b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    { 1.e+6, -1.e-6},
210b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
211b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    { 1.e-6,  1.e+6},
212b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1.e-6,  1.e+6},
213b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1.e-6, -1.e+6},
214b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    { 1.e-6, -1.e+6},
215b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
216b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    { 1.e+6,  1.e+6},
217b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1.e+6,  1.e+6},
218b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1.e+6, -1.e+6},
219b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    { 1.e+6, -1.e+6},
220b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
221b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, NAN},
222b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, NAN},
223b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, NAN},
224b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, NAN},
225b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, NAN},
226b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., NAN},
227b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., NAN},
228b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, NAN},
229b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, NAN},
230b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, NAN},
231b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, NAN},
232b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
233b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, -INFINITY},
234b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, -INFINITY},
235b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, -INFINITY},
236b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, -INFINITY},
237b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, -INFINITY},
238b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., -INFINITY},
239b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., -INFINITY},
240b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, -INFINITY},
241b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, -INFINITY},
242b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, -INFINITY},
243b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, -INFINITY},
244b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
245b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, -2},
246b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, -2},
247b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, -2},
248b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, -2},
249b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, -2},
250b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., -2},
251b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., -2},
252b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, -2},
253b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, -2},
254b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, -2},
255b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, -2},
256b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
257b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, -1},
258b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, -1},
259b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, -1},
260b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, -1},
261b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, -1},
262b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., -1},
263b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., -1},
264b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, -1},
265b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, -1},
266b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, -1},
267b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, -1},
268b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
269b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, -0.5},
270b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, -0.5},
271b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, -0.5},
272b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, -0.5},
273b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, -0.5},
274b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., -0.5},
275b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., -0.5},
276b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, -0.5},
277b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, -0.5},
278b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, -0.5},
279b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, -0.5},
280b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
281b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, -0.},
282b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, -0.},
283b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, -0.},
284b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, -0.},
285b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, -0.},
286b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., -0.},
287b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., -0.},
288b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, -0.},
289b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, -0.},
290b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, -0.},
291b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, -0.},
292b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
293b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, 0.},
294b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, 0.},
295b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, 0.},
296b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, 0.},
297b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, 0.},
298b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., 0.},
299b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., 0.},
300b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, 0.},
301b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, 0.},
302b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, 0.},
303b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, 0.},
304b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
305b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, 0.5},
306b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, 0.5},
307b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, 0.5},
308b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, 0.5},
309b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, 0.5},
310b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., 0.5},
311b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., 0.5},
312b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, 0.5},
313b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, 0.5},
314b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, 0.5},
315b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, 0.5},
316b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
317b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, 1},
318b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, 1},
319b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, 1},
320b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, 1},
321b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, 1},
322b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., 1},
323b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., 1},
324b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, 1},
325b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, 1},
326b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, 1},
327b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, 1},
328b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
329b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, 2},
330b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, 2},
331b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, 2},
332b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, 2},
333b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, 2},
334b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., 2},
335b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., 2},
336b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, 2},
337b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, 2},
338b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, 2},
339b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, 2},
340b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
341b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {NAN, INFINITY},
342b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-INFINITY, INFINITY},
343b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-2, INFINITY},
344b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-1, INFINITY},
345b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0.5, INFINITY},
346b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {-0., INFINITY},
347b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {+0., INFINITY},
348b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {0.5, INFINITY},
349b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {1, INFINITY},
350b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {2, INFINITY},
351b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {INFINITY, INFINITY}
352b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
353b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar};
354b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
355b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#endif
356b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
357b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbarint main()
358b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar{
359b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#if !_ARCH_PPC
360b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    const unsigned N = sizeof(x) / sizeof(x[0]);
361b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    unsigned i, j;
362b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    for (i = 0; i < N; ++i)
363b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    {
364b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        for (j = 0; j < N; ++j)
365b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        {
366b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar            if (test__mulxc3(x[i][0], x[i][1], x[j][0], x[j][1]))
367b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar                return 1;
368b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar        }
369b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    }
370b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar
3717482815716cd9b87931d82dca7298fc3c707229fJoerg Sonnenberger#else
3727482815716cd9b87931d82dca7298fc3c707229fJoerg Sonnenberger    printf("skipped\n");
373b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar#endif
374b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar    return 0;
375b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar}
376