Home | History | Annotate | Download | only in libbid

Lines Matching refs:C1

50   UINT128 C1;			// C1.w[1], C1.w[0] represent x_signif_hi, x_signif_lo (UINT64)
55 C1.w[1] = x.w[1] & MASK_COEFF;
56 C1.w[0] = x.w[0];
96 C1.w[1] = 0; // significand high
97 C1.w[0] = 0; // significand low
100 if (C1.w[1] > 0x0001ed09bead87c0ull ||
101 (C1.w[1] == 0x0001ed09bead87c0ull
102 && C1.w[0] > 0x378d8e63ffffffffull)) {
104 C1.w[1] = 0;
105 C1.w[0] = 0;
111 if ((C1.w[1] == 0x0ull) && (C1.w[0] == 0x0ull)) {
132 if (C1.w[1] == 0) {
133 if (C1.w[0] >= 0x0020000000000000ull) { // x >= 2^53
135 if (C1.w[0] >= 0x0000000100000000ull) { // x >= 2^32
136 tmp1.d = (double) (C1.w[0] >> 32); // exact conversion
141 tmp1.d = (double) (C1.w[0]); // exact conversion
147 tmp1.d = (double) C1.w[0]; // exact conversion
151 } else { // C1.w[1] != 0 => nr. bits = 64 + nr_bits (C1.w[1])
152 tmp1.d = (double) C1.w[1]; // exact conversion
159 if (C1.w[1] > nr_digits[x_nr_bits - 1].threshold_hi
160 || (C1.w[1] == nr_digits[x_nr_bits - 1].threshold_hi
161 && C1.w[0] >= nr_digits[x_nr_bits - 1].threshold_lo))
170 // C1 = C1 * 10^ind
171 if (q1 <= 19) { // 64-bit C1
172 if (ind <= 19) { // 64-bit 10^ind and 64-bit C1
173 __mul_64x64_to_128MACH (C1, C1.w[0], ten2k64[ind]);
174 } else { // 128-bit 10^ind and 64-bit C1
175 __mul_128x64_to_128 (C1, C1.w[0], ten2k128[ind - 20]);
177 } else { // C1 is (most likely) 128-bit
178 if (ind <= 14) { // 64-bit 10^ind and 128-bit C1 (most likely)
179 __mul_128x64_to_128 (C1, ten2k64[ind], C1);
180 } else if (ind <= 19) { // 64-bit 10^ind and 64-bit C1 (q1 <= 19)
181 __mul_64x64_to_128MACH (C1, C1.w[0], ten2k64[ind]);
182 } else { // 128-bit 10^ind and 64-bit C1 (C1 must be 64-bit)
183 __mul_128x64_to_128 (C1, C1.w[0], ten2k128[ind - 20]);
189 // C1 = C1 * 10^ind
191 if (q1 <= 19) { // 64-bit C1, 64-bit 10^ind
192 __mul_64x64_to_128MACH (C1, C1.w[0], ten2k64[ind]);
193 } else { // 20 <= q1 <= 33 => 128-bit C1, 64-bit 10^ind
194 __mul_128x64_to_128 (C1, ten2k64[ind], C1);
197 // 64-bit C1, 128-bit 10^ind
198 __mul_128x64_to_128 (C1, C1.w[0], ten2k128[ind - 20]);
205 C1.w[0]++;
206 if (C1.w[0] == 0)
207 C1.w[1]++;
208 if (C1.w[1] == 0x0001ed09bead87c0ull && C1.w[0] == 0x378d8e6400000000ull) { // if C1 = 10^34
209 C1.w[1] = 0x0000314dc6448d93ull; // C1 = 10^33
210 C1.w[0] = 0x38c15b0a00000000ull;
215 C1.w[0]--;
216 if (C1.w[0] == 0xffffffffffffffffull)
217 C1.w[1]--;
218 if (x_exp != 0 && C1.w[1] == 0x0000314dc6448d93ull && C1.w[0] == 0x38c15b09ffffffffull) { // if C1 = 10^33 - 1
219 C1.w[1] = 0x0001ed09bead87c0ull; // C1 = 10^34 - 1
220 C1.w[0] = 0x378d8e63ffffffffull;
225 res.w[1] = x_sign | x_exp | C1.w[1];
226 res.w[0] = C1.w[0];
255 UINT128 C1; // C1.w[1], C1.w[0] represent x_signif_hi, x_signif_lo (UINT64)
260 C1.w[1] = x.w[1] & MASK_COEFF;
261 C1.w[0] = x.w[0];
301 C1.w[1] = 0; // significand high
302 C1.w[0] = 0; // significand low
305 if (C1.w[1] > 0x0001ed09bead87c0ull ||
306 (C1.w[1] == 0x0001ed09bead87c0ull
307 && C1.w[0] > 0x378d8e63ffffffffull)) {
309 C1.w[1] = 0;
310 C1.w[0] = 0;
316 if ((C1.w[1] == 0x0ull) && (C1.w[0] == 0x0ull)) {
335 if (C1.w[1] == 0) {
336 if (C1.w[0] >= 0x0020000000000000ull) { // x >= 2^53
338 if (C1.w[0] >= 0x0000000100000000ull) { // x >= 2^32
339 tmp1.d = (double) (C1.w[0] >> 32); // exact conversion
344 tmp1.d = (double) (C1.w[0]); // exact conversion
350 tmp1.d = (double) C1.w[0]; // exact conversion
354 } else { // C1.w[1] != 0 => nr. bits = 64 + nr_bits (C1.w[1])
355 tmp1.d = (double) C1.w[1]; // exact conversion
362 if (C1.w[1] > nr_digits[x_nr_bits - 1].threshold_hi
363 || (C1.w[1] == nr_digits[x_nr_bits - 1].threshold_hi
364 && C1.w[0] >= nr_digits[x_nr_bits - 1].threshold_lo))
373 // C1 = C1 * 10^ind
374 if (q1 <= 19) { // 64-bit C1
375 if (ind <= 19) { // 64-bit 10^ind and 64-bit C1
376 __mul_64x64_to_128MACH (C1, C1.w[0], ten2k64[ind]);
377 } else { // 128-bit 10^ind and 64-bit C1
378 __mul_128x64_to_128 (C1, C1.w[0], ten2k128[ind - 20]);
380 } else { // C1 is (most likely) 128-bit
381 if (ind <= 14) { // 64-bit 10^ind and 128-bit C1 (most likely)
382 __mul_128x64_to_128 (C1, ten2k64[ind], C1);
383 } else if (ind <= 19) { // 64-bit 10^ind and 64-bit C1 (q1 <= 19)
384 __mul_64x64_to_128MACH (C1, C1.w[0], ten2k64[ind]);
385 } else { // 128-bit 10^ind and 64-bit C1 (C1 must be 64-bit)
386 __mul_128x64_to_128 (C1, C1.w[0], ten2k128[ind - 20]);
392 // C1 = C1 * 10^ind
394 if (q1 <= 19) { // 64-bit C1, 64-bit 10^ind
395 __mul_64x64_to_128MACH (C1, C1.w[0], ten2k64[ind]);
396 } else { // 20 <= q1 <= 33 => 128-bit C1, 64-bit 10^ind
397 __mul_128x64_to_128 (C1, ten2k64[ind], C1);
400 // 64-bit C1, 128-bit 10^ind
401 __mul_128x64_to_128 (C1, C1.w[0], ten2k128[ind - 20]);
408 C1.w[0]++;
409 if (C1.w[0] == 0)
410 C1.w[1]++;
411 if (C1.w[1] == 0x0001ed09bead87c0ull && C1.w[0] == 0x378d8e6400000000ull) { // if C1 = 10^34
412 C1.w[1] = 0x0000314dc6448d93ull; // C1 = 10^33
413 C1.w[0] = 0x38c15b0a00000000ull;
418 C1.w[0]--;
419 if (C1.w[0] == 0xffffffffffffffffull)
420 C1.w[1]--;
421 if (x_exp != 0 && C1.w[1] == 0x0000314dc6448d93ull && C1.w[0] == 0x38c15b09ffffffffull) { // if C1 = 10^33 - 1
422 C1.w[1] = 0x0001ed09bead87c0ull; // C1 = 10^34 - 1
423 C1.w[0] = 0x378d8e63ffffffffull;
428 res.w[1] = x_sign | x_exp | C1.w[1];
429 res.w[0] = C1.w[0];