135 y##N = (y##N - z##N * pio2_1) - z##N * pio2_t; \
136 } \
137 z##N = y##N * y##N; \
138 if (n##N & 1) { /* compute cos y */ \
139 f##N = (float)(one + z##N * (mhalf + z##N * (C0 + \
140 z##N * (C1 + z##N * C2)))); \
141 } else { /* compute sin y */ \
142 f##N = (float)(y##N + y##N * z##N * (S0 + z##N * (S1 + \
143 z##N * S2))); \
144 } \
145 *y = (n##N & 2)? -f##N : f##N; \
146 y += stridey
147
148 void
149 __vsinf(int n, float *restrict x, int stridex, float *restrict y,
150 int stridey)
151 {
152 double y0, y1, y2, y3;
153 double z0, z1, z2, z3;
154 float f0, f1, f2, f3, t;
155 int n0, n1, n2, n3, hx, ix, medium;
156
157 y -= stridey;
158
159 for (;;) {
160 begin:
161 y += stridey;
162
163 if (--n < 0)
164 break;
165
166 medium = 0;
167 PREPROCESS(0, 0, begin);
168
169 if (--n < 0)
170 goto process1;
171
172 PREPROCESS(1, stridey, process1);
173
174 if (--n < 0)
175 goto process2;
|
135 y##N = (y##N - z##N * pio2_1) - z##N * pio2_t; \
136 } \
137 z##N = y##N * y##N; \
138 if (n##N & 1) { /* compute cos y */ \
139 f##N = (float)(one + z##N * (mhalf + z##N * (C0 + \
140 z##N * (C1 + z##N * C2)))); \
141 } else { /* compute sin y */ \
142 f##N = (float)(y##N + y##N * z##N * (S0 + z##N * (S1 + \
143 z##N * S2))); \
144 } \
145 *y = (n##N & 2)? -f##N : f##N; \
146 y += stridey
147
148 void
149 __vsinf(int n, float *restrict x, int stridex, float *restrict y,
150 int stridey)
151 {
152 double y0, y1, y2, y3;
153 double z0, z1, z2, z3;
154 float f0, f1, f2, f3, t;
155 int n0 = 0, n1 = 0, n2 = 0, n3, hx, ix, medium;
156
157 y -= stridey;
158
159 for (;;) {
160 begin:
161 y += stridey;
162
163 if (--n < 0)
164 break;
165
166 medium = 0;
167 PREPROCESS(0, 0, begin);
168
169 if (--n < 0)
170 goto process1;
171
172 PREPROCESS(1, stridey, process1);
173
174 if (--n < 0)
175 goto process2;
|