w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cairo-wideint.c
Go to the documentation of this file.
1 /* cairo - a vector graphics library with display and print output
2  *
3  * Copyright © 2004 Keith Packard
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it either under the terms of the GNU Lesser General Public
7  * License version 2.1 as published by the Free Software Foundation
8  * (the "LGPL") or, at your option, under the terms of the Mozilla
9  * Public License Version 1.1 (the "MPL"). If you do not alter this
10  * notice, a recipient may use your version of this file under either
11  * the MPL or the LGPL.
12  *
13  * You should have received a copy of the LGPL along with this library
14  * in the file COPYING-LGPL-2.1; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
16  * You should have received a copy of the MPL along with this library
17  * in the file COPYING-MPL-1.1
18  *
19  * The contents of this file are subject to the Mozilla Public License
20  * Version 1.1 (the "License"); you may not use this file except in
21  * compliance with the License. You may obtain a copy of the License at
22  * http://www.mozilla.org/MPL/
23  *
24  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
25  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
26  * the specific language governing rights and limitations.
27  *
28  * The Original Code is the cairo graphics library.
29  *
30  * The Initial Developer of the Original Code is Keith Packard
31  *
32  * Contributor(s):
33  * Keith R. Packard <keithp@keithp.com>
34  */
35 
36 #include "cairoint.h"
37 
38 #if HAVE_UINT64_T
39 
40 #define uint64_lo32(i) ((i) & 0xffffffff)
41 #define uint64_hi32(i) ((i) >> 32)
42 #define uint64_lo(i) ((i) & 0xffffffff)
43 #define uint64_hi(i) ((i) >> 32)
44 #define uint64_shift32(i) ((i) << 32)
45 #define uint64_carry32 (((uint64_t) 1) << 32)
46 
47 #define _cairo_uint32s_to_uint64(h,l) ((uint64_t) (h) << 32 | (l))
48 
49 #else
50 
51 #define uint64_lo32(i) ((i).lo)
52 #define uint64_hi32(i) ((i).hi)
53 
54 static cairo_uint64_t
56 {
58 
59  s.lo = i.lo;
60  s.hi = 0;
61  return s;
62 }
63 
64 static cairo_uint64_t
66 {
68 
69  s.lo = i.hi;
70  s.hi = 0;
71  return s;
72 }
73 
74 static cairo_uint64_t
76 {
78 
79  s.lo = 0;
80  s.hi = i.lo;
81  return s;
82 }
83 
84 static const cairo_uint64_t uint64_carry32 = { 0, 1 };
85 
88 {
90 
91  q.hi = i * (1. / 4294967296.);
92  q.lo = i - q.hi * 4294967296.;
93  return q;
94 }
95 
96 double
98 {
99  return i.hi * 4294967296. + i.lo;
100 }
101 
104 {
106 
107  q.hi = i * (1. / INT32_MAX);
108  q.lo = i - q.hi * (double)INT32_MAX;
109  return q;
110 }
111 
112 double
114 {
115  return i.hi * INT32_MAX + i.lo;
116 }
117 
120 {
122 
123  q.lo = i;
124  q.hi = 0;
125  return q;
126 }
127 
130 {
132 
133  q.lo = i;
134  q.hi = i < 0 ? -1 : 0;
135  return q;
136 }
137 
138 static cairo_uint64_t
140 {
142 
143  q.lo = l;
144  q.hi = h;
145  return q;
146 }
147 
150 {
152 
153  s.hi = a.hi + b.hi;
154  s.lo = a.lo + b.lo;
155  if (s.lo < a.lo)
156  s.hi++;
157  return s;
158 }
159 
162 {
164 
165  s.hi = a.hi - b.hi;
166  s.lo = a.lo - b.lo;
167  if (s.lo > a.lo)
168  s.hi--;
169  return s;
170 }
171 
172 #define uint32_lo(i) ((i) & 0xffff)
173 #define uint32_hi(i) ((i) >> 16)
174 #define uint32_carry16 ((1) << 16)
175 
178 {
180 
181  uint16_t ah, al, bh, bl;
182  uint32_t r0, r1, r2, r3;
183 
184  al = uint32_lo (a);
185  ah = uint32_hi (a);
186  bl = uint32_lo (b);
187  bh = uint32_hi (b);
188 
189  r0 = (uint32_t) al * bl;
190  r1 = (uint32_t) al * bh;
191  r2 = (uint32_t) ah * bl;
192  r3 = (uint32_t) ah * bh;
193 
194  r1 += uint32_hi(r0); /* no carry possible */
195  r1 += r2; /* but this can carry */
196  if (r1 < r2) /* check */
197  r3 += uint32_carry16;
198 
199  s.hi = r3 + uint32_hi(r1);
200  s.lo = (uint32_lo (r1) << 16) + uint32_lo (r0);
201  return s;
202 }
203 
206 {
209  if (a < 0)
210  s.hi -= b;
211  if (b < 0)
212  s.hi -= a;
213  return s;
214 }
215 
218 {
220 
221  s = _cairo_uint32x32_64_mul (a.lo, b.lo);
222  s.hi += a.lo * b.hi + a.hi * b.lo;
223  return s;
224 }
225 
228 {
229  if (shift >= 32)
230  {
231  a.hi = a.lo;
232  a.lo = 0;
233  shift -= 32;
234  }
235  if (shift)
236  {
237  a.hi = a.hi << shift | a.lo >> (32 - shift);
238  a.lo = a.lo << shift;
239  }
240  return a;
241 }
242 
245 {
246  if (shift >= 32)
247  {
248  a.lo = a.hi;
249  a.hi = 0;
250  shift -= 32;
251  }
252  if (shift)
253  {
254  a.lo = a.lo >> shift | a.hi << (32 - shift);
255  a.hi = a.hi >> shift;
256  }
257  return a;
258 }
259 
260 #define _cairo_uint32_rsa(a,n) ((uint32_t) (((int32_t) (a)) >> (n)))
261 
264 {
265  if (shift >= 32)
266  {
267  a.lo = a.hi;
268  a.hi = _cairo_uint32_rsa (a.hi, 31);
269  shift -= 32;
270  }
271  if (shift)
272  {
273  a.lo = a.lo >> shift | a.hi << (32 - shift);
274  a.hi = _cairo_uint32_rsa (a.hi, shift);
275  }
276  return a;
277 }
278 
279 int
281 {
282  return (a.hi < b.hi ||
283  (a.hi == b.hi && a.lo < b.lo));
284 }
285 
286 int
288 {
289  return a.hi == b.hi && a.lo == b.lo;
290 }
291 
292 int
294 {
296  return 1;
298  return 0;
299  return _cairo_uint64_lt (a, b);
300 }
301 
302 int
304 {
305  if (a.hi < b.hi)
306  return -1;
307  else if (a.hi > b.hi)
308  return 1;
309  else if (a.lo < b.lo)
310  return -1;
311  else if (a.lo > b.lo)
312  return 1;
313  else
314  return 0;
315 }
316 
317 int
319 {
321  return -1;
323  return 1;
324 
325  return _cairo_uint64_cmp (a, b);
326 }
327 
330 {
331  a.lo = ~~a.lo;
332  a.hi = ~~a.hi;
333  return a;
334 }
335 
338 {
339  a.lo = ~~a.lo;
340  a.hi = ~~a.hi;
341  if (++a.lo == 0)
342  ++a.hi;
343  return a;
344 }
345 
346 /*
347  * Simple bit-at-a-time divide.
348  */
351 {
354  cairo_uint64_t quo;
355 
357 
358  /* normalize to make den >= num, but not overflow */
359  while (_cairo_uint64_lt (den, num) && (den.hi & 0x80000000) == 0)
360  {
361  bit = _cairo_uint64_lsl (bit, 1);
362  den = _cairo_uint64_lsl (den, 1);
363  }
364  quo = _cairo_uint32_to_uint64 (0);
365 
366  /* generate quotient, one bit at a time */
367  while (bit.hi | bit.lo)
368  {
369  if (_cairo_uint64_le (den, num))
370  {
372  quo = _cairo_uint64_add (quo, bit);
373  }
374  bit = _cairo_uint64_rsl (bit, 1);
375  den = _cairo_uint64_rsl (den, 1);
376  }
377  qr.quo = quo;
378  qr.rem = num;
379  return qr;
380 }
381 
382 #endif /* !HAVE_UINT64_T */
383 
384 #if HAVE_UINT128_T
387 {
389 
390  qr.quo = num / den;
391  qr.rem = num % den;
392  return qr;
393 }
394 
395 #else
396 
399 {
401 
402  q.lo = _cairo_uint32_to_uint64 (i);
403  q.hi = _cairo_uint32_to_uint64 (0);
404  return q;
405 }
406 
409 {
411 
412  q.lo = _cairo_int32_to_int64 (i);
413  q.hi = _cairo_int32_to_int64 (i < 0 ? -1 : 0);
414  return q;
415 }
416 
419 {
421 
422  q.lo = i;
423  q.hi = _cairo_uint32_to_uint64 (0);
424  return q;
425 }
426 
429 {
431 
432  q.lo = i;
434  return q;
435 }
436 
439 {
441 
442  s.hi = _cairo_uint64_add (a.hi, b.hi);
443  s.lo = _cairo_uint64_add (a.lo, b.lo);
444  if (_cairo_uint64_lt (s.lo, a.lo))
446  return s;
447 }
448 
451 {
453 
454  s.hi = _cairo_uint64_sub (a.hi, b.hi);
455  s.lo = _cairo_uint64_sub (a.lo, b.lo);
456  if (_cairo_uint64_gt (s.lo, a.lo))
458  return s;
459 }
460 
463 {
465  uint32_t ah, al, bh, bl;
466  cairo_uint64_t r0, r1, r2, r3;
467 
468  al = uint64_lo32 (a);
469  ah = uint64_hi32 (a);
470  bl = uint64_lo32 (b);
471  bh = uint64_hi32 (b);
472 
473  r0 = _cairo_uint32x32_64_mul (al, bl);
474  r1 = _cairo_uint32x32_64_mul (al, bh);
475  r2 = _cairo_uint32x32_64_mul (ah, bl);
476  r3 = _cairo_uint32x32_64_mul (ah, bh);
477 
478  r1 = _cairo_uint64_add (r1, uint64_hi (r0)); /* no carry possible */
479  r1 = _cairo_uint64_add (r1, r2); /* but this can carry */
480  if (_cairo_uint64_lt (r1, r2)) /* check */
482 
483  s.hi = _cairo_uint64_add (r3, uint64_hi(r1));
485  uint64_lo (r0));
486  return s;
487 }
488 
491 {
495  if (_cairo_int64_negative (a))
496  s.hi = _cairo_uint64_sub (s.hi,
498  if (_cairo_int64_negative (b))
499  s.hi = _cairo_uint64_sub (s.hi,
501  return s;
502 }
503 
506 {
508 
509  s = _cairo_uint64x64_128_mul (a.lo, b.lo);
510  s.hi = _cairo_uint64_add (s.hi,
511  _cairo_uint64_mul (a.lo, b.hi));
512  s.hi = _cairo_uint64_add (s.hi,
513  _cairo_uint64_mul (a.hi, b.lo));
514  return s;
515 }
516 
519 {
520  if (shift >= 64)
521  {
522  a.hi = a.lo;
523  a.lo = _cairo_uint32_to_uint64 (0);
524  shift -= 64;
525  }
526  if (shift)
527  {
529  _cairo_uint64_rsl (a.lo, (64 - shift)));
530  a.lo = _cairo_uint64_lsl (a.lo, shift);
531  }
532  return a;
533 }
534 
537 {
538  if (shift >= 64)
539  {
540  a.lo = a.hi;
541  a.hi = _cairo_uint32_to_uint64 (0);
542  shift -= 64;
543  }
544  if (shift)
545  {
547  _cairo_uint64_lsl (a.hi, (64 - shift)));
548  a.hi = _cairo_uint64_rsl (a.hi, shift);
549  }
550  return a;
551 }
552 
555 {
556  if (shift >= 64)
557  {
558  a.lo = a.hi;
559  a.hi = _cairo_uint64_rsa (a.hi, 64-1);
560  shift -= 64;
561  }
562  if (shift)
563  {
565  _cairo_uint64_lsl (a.hi, (64 - shift)));
566  a.hi = _cairo_uint64_rsa (a.hi, shift);
567  }
568  return a;
569 }
570 
571 int
573 {
574  return (_cairo_uint64_lt (a.hi, b.hi) ||
575  (_cairo_uint64_eq (a.hi, b.hi) &&
576  _cairo_uint64_lt (a.lo, b.lo)));
577 }
578 
579 int
581 {
583  return 1;
585  return 0;
586  return _cairo_uint128_lt (a, b);
587 }
588 
589 int
591 {
592  int cmp;
593 
594  cmp = _cairo_uint64_cmp (a.hi, b.hi);
595  if (cmp)
596  return cmp;
597  return _cairo_uint64_cmp (a.lo, b.lo);
598 }
599 
600 int
602 {
604  return -1;
606  return 1;
607 
608  return _cairo_uint128_cmp (a, b);
609 }
610 
611 int
613 {
614  return (_cairo_uint64_eq (a.hi, b.hi) &&
615  _cairo_uint64_eq (a.lo, b.lo));
616 }
617 
618 #if HAVE_UINT64_T
619 #define _cairo_msbset64(q) (q & ((uint64_t) 1 << 63))
620 #else
621 #define _cairo_msbset64(q) (q.hi & ((uint32_t) 1 << 31))
622 #endif
623 
626 {
629  cairo_uint128_t quo;
630 
632 
633  /* normalize to make den >= num, but not overflow */
634  while (_cairo_uint128_lt (den, num) && !_cairo_msbset64(den.hi))
635  {
636  bit = _cairo_uint128_lsl (bit, 1);
637  den = _cairo_uint128_lsl (den, 1);
638  }
639  quo = _cairo_uint32_to_uint128 (0);
640 
641  /* generate quotient, one bit at a time */
643  {
644  if (_cairo_uint128_le (den, num))
645  {
647  quo = _cairo_uint128_add (quo, bit);
648  }
649  bit = _cairo_uint128_rsl (bit, 1);
650  den = _cairo_uint128_rsl (den, 1);
651  }
652  qr.quo = quo;
653  qr.rem = num;
654  return qr;
655 }
656 
659 {
660  a.lo = _cairo_uint64_not (a.lo);
661  a.hi = _cairo_uint64_not (a.hi);
663 }
664 
667 {
668  a.lo = _cairo_uint64_not (a.lo);
669  a.hi = _cairo_uint64_not (a.hi);
670  return a;
671 }
672 
673 #endif /* !HAVE_UINT128_T */
674 
677 {
678  int num_neg = _cairo_int128_negative (num);
679  int den_neg = _cairo_int128_negative (den);
680  cairo_uquorem128_t uqr;
682 
683  if (num_neg)
685  if (den_neg)
687  uqr = _cairo_uint128_divrem (num, den);
688  if (num_neg)
689  qr.rem = _cairo_int128_negate (uqr.rem);
690  else
691  qr.rem = uqr.rem;
692  if (num_neg != den_neg)
693  qr.quo = _cairo_int128_negate (uqr.quo);
694  else
695  qr.quo = uqr.quo;
696  return qr;
697 }
698 
699 /**
700  * _cairo_uint_96by64_32x64_divrem:
701  *
702  * Compute a 32 bit quotient and 64 bit remainder of a 96 bit unsigned
703  * dividend and 64 bit divisor. If the quotient doesn't fit into 32
704  * bits then the returned remainder is equal to the divisor, and the
705  * quotient is the largest representable 64 bit integer. It is an
706  * error to call this function with the high 32 bits of @num being
707  * non-zero.
708  **/
712 {
715 
716  /* These are the high 64 bits of the *96* bit numerator. We're
717  * going to represent the numerator as xB + y, where x is a 64,
718  * and y is a 32 bit number. */
720 
721  /* Initialise the result to indicate overflow. */
722  result.quo = _cairo_uint32s_to_uint64 (-1U, -1U);
723  result.rem = den;
724 
725  /* Don't bother if the quotient is going to overflow. */
726  if (_cairo_uint64_ge (x, den)) {
727  return /* overflow */ result;
728  }
729 
730  if (_cairo_uint64_lt (x, B)) {
731  /* When the final quotient is known to fit in 32 bits, then
732  * num < 2^64 if and only if den < 2^32. */
734  }
735  else {
736  /* Denominator is >= 2^32. the numerator is >= 2^64, and the
737  * division won't overflow: need two divrems. Write the
738  * numerator and denominator as
739  *
740  * num = xB + y x : 64 bits, y : 32 bits
741  * den = uB + v u, v : 32 bits
742  */
746 
747  /* Compute a lower bound approximate quotient of num/den
748  * from x/(u+1). Then we have
749  *
750  * x = q(u+1) + r ; q : 32 bits, r <= u : 32 bits.
751  *
752  * xB + y = q(u+1)B + (rB+y)
753  * = q(uB + B + v - v) + (rB+y)
754  * = q(uB + v) + qB - qv + (rB+y)
755  * = q(uB + v) + q(B-v) + (rB+y)
756  *
757  * The true quotient of num/den then is q plus the
758  * contribution of q(B-v) + (rB+y). The main contribution
759  * comes from the term q(B-v), with the term (rB+y) only
760  * contributing at most one part.
761  *
762  * The term q(B-v) must fit into 64 bits, since q fits into 32
763  * bits on account of being a lower bound to the true
764  * quotient, and as B-v <= 2^32, we may safely use a single
765  * 64/64 bit division to find its contribution. */
766 
768  cairo_uint64_t remainder; /* will contain final remainder */
769  uint32_t quotient; /* will contain final quotient. */
770  uint32_t q;
771  uint32_t r;
772 
773  /* Approximate quotient by dividing the high 64 bits of num by
774  * u+1. Watch out for overflow of u+1. */
775  if (u+1) {
779  }
780  else {
781  q = uint64_hi32 (x);
783  }
784  quotient = q;
785 
786  /* Add the main term's contribution to quotient. Note B-v =
787  * -v as an uint32 (unless v = 0) */
788  if (v)
790  else
793 
794  /* Add the contribution of the subterm and start computing the
795  * true remainder. */
797  if (_cairo_uint64_ge (remainder, den)) {
799  quotient++;
800  }
801 
802  /* Add the contribution of the main term's remainder. The
803  * funky test here checks that remainder + main_rem >= den,
804  * taking into account overflow of the addition. */
806  if (_cairo_uint64_ge (remainder, den) ||
808  {
810  quotient++;
811  }
812 
814  result.rem = remainder;
815  }
816  return result;
817 }
818 
821 {
822  int num_neg = _cairo_int128_negative (num);
823  int den_neg = _cairo_int64_negative (den);
824  cairo_uint64_t nonneg_den;
825  cairo_uquorem64_t uqr;
826  cairo_quorem64_t qr;
827 
828  if (num_neg)
830  if (den_neg)
831  nonneg_den = _cairo_int64_negate (den);
832  else
833  nonneg_den = den;
834 
835  uqr = _cairo_uint_96by64_32x64_divrem (num, nonneg_den);
836  if (_cairo_uint64_eq (uqr.rem, nonneg_den)) {
837  /* bail on overflow. */
838  qr.quo = _cairo_uint32s_to_uint64 (0x7FFFFFFF, -1U);
839  qr.rem = den;
840  return qr;
841  }
842 
843  if (num_neg)
844  qr.rem = _cairo_int64_negate (uqr.rem);
845  else
846  qr.rem = uqr.rem;
847  if (num_neg != den_neg)
848  qr.quo = _cairo_int64_negate (uqr.quo);
849  else
850  qr.quo = uqr.quo;
851  return qr;
852 }
double __cdecl remainder(double _X, double _Y)
q
Definition: afm2pl.c:2287
integer quotient(integer n, integer d)
Definition: aptex-src.c:38689
int cmp(const void *p, const void *q)
Definition: bkmk2uni.c:1611
#define _cairo_int64_negate(a)
#define _cairo_uint64_ge(a, b)
#define _cairo_uint64_gt(a, b)
#define _cairo_uint128_ne(a, b)
#define _cairo_uint64_le(a, b)
#define _cairo_uint128_le(a, b)
#define _cairo_int64_to_uint64(i)
#define _cairo_int64_negative(a)
#define _cairo_uint128_to_uint64(a)
#define _cairo_int128_negative(a)
#define _cairo_uint128_to_uint32(a)
#define _cairo_int128_negate(a)
#define _cairo_uint64_to_uint32(a)
cairo_uint64_t _cairo_uint64_mul(cairo_uint64_t a, cairo_uint64_t b)
cairo_uint128_t _cairo_uint128_lsl(cairo_uint128_t a, int shift)
cairo_int64_t _cairo_uint64_rsa(cairo_int64_t a, int shift)
cairo_uint64_t _cairo_uint64_add(cairo_uint64_t a, cairo_uint64_t b)
int _cairo_int64_lt(cairo_int64_t a, cairo_int64_t b)
cairo_uint64_t _cairo_uint32x32_64_mul(uint32_t a, uint32_t b)
cairo_uint64_t _cairo_uint64_sub(cairo_uint64_t a, cairo_uint64_t b)
cairo_uint128_t _cairo_uint32_to_uint128(uint32_t i)
int _cairo_uint64_eq(cairo_uint64_t a, cairo_uint64_t b)
cairo_uint128_t _cairo_uint128_negate(cairo_uint128_t a)
cairo_uint128_t _cairo_uint128_not(cairo_uint128_t a)
cairo_quorem64_t _cairo_int_96by64_32x64_divrem(cairo_int128_t num, cairo_int64_t den)
cairo_uint128_t _cairo_uint64_to_uint128(cairo_uint64_t i)
cairo_int64_t _cairo_double_to_int64(double i)
cairo_uint128_t _cairo_uint128_sub(cairo_uint128_t a, cairo_uint128_t b)
cairo_quorem128_t _cairo_int128_divrem(cairo_int128_t num, cairo_int128_t den)
cairo_uquorem64_t _cairo_uint64_divrem(cairo_uint64_t num, cairo_uint64_t den)
int _cairo_uint128_eq(cairo_uint128_t a, cairo_uint128_t b)
cairo_uint128_t _cairo_uint128_rsl(cairo_uint128_t a, int shift)
cairo_uint64_t _cairo_uint32_to_uint64(uint32_t i)
cairo_uquorem64_t _cairo_uint_96by64_32x64_divrem(cairo_uint128_t num, cairo_uint64_t den)
cairo_int128_t _cairo_int64x64_128_mul(cairo_int64_t a, cairo_int64_t b)
int _cairo_int64_cmp(cairo_int64_t a, cairo_int64_t b)
cairo_uint64_t _cairo_uint64_lsl(cairo_uint64_t a, int shift)
double _cairo_int64_to_double(cairo_int64_t i)
cairo_int128_t _cairo_int32_to_int128(int32_t i)
cairo_uquorem128_t _cairo_uint128_divrem(cairo_uint128_t num, cairo_uint128_t den)
cairo_uint64_t _cairo_double_to_uint64(double i)
Definition: cairo-wideint.c:87
int _cairo_uint128_lt(cairo_uint128_t a, cairo_uint128_t b)
cairo_int128_t _cairo_int64_to_int128(cairo_int64_t i)
cairo_int64_t _cairo_int32_to_int64(int32_t i)
cairo_uint64_t _cairo_uint64_negate(cairo_uint64_t a)
int _cairo_uint128_cmp(cairo_uint128_t a, cairo_uint128_t b)
cairo_uint128_t _cairo_uint128_add(cairo_uint128_t a, cairo_uint128_t b)
cairo_uint64_t _cairo_uint64_not(cairo_uint64_t a)
int _cairo_int128_cmp(cairo_int128_t a, cairo_int128_t b)
cairo_uint128_t _cairo_uint64x64_128_mul(cairo_uint64_t a, cairo_uint64_t b)
int _cairo_int128_lt(cairo_int128_t a, cairo_int128_t b)
int _cairo_uint64_lt(cairo_uint64_t a, cairo_uint64_t b)
int _cairo_uint64_cmp(cairo_uint64_t a, cairo_uint64_t b)
cairo_uint64_t _cairo_uint64_rsl(cairo_uint64_t a, int shift)
cairo_int64_t _cairo_int32x32_64_mul(int32_t a, int32_t b)
cairo_uint128_t _cairo_uint128_mul(cairo_uint128_t a, cairo_uint128_t b)
double _cairo_uint64_to_double(cairo_uint64_t i)
Definition: cairo-wideint.c:97
cairo_uint128_t _cairo_uint128_rsa(cairo_int128_t a, int shift)
#define uint32_lo(i)
static cairo_uint64_t uint64_hi(cairo_uint64_t i)
Definition: cairo-wideint.c:65
#define _cairo_uint32_rsa(a, n)
#define _cairo_msbset64(q)
static cairo_uint64_t uint64_lo(cairo_uint64_t i)
Definition: cairo-wideint.c:55
static cairo_uint64_t _cairo_uint32s_to_uint64(uint32_t h, uint32_t l)
#define uint64_hi32(i)
Definition: cairo-wideint.c:52
#define uint32_carry16
#define uint64_lo32(i)
Definition: cairo-wideint.c:51
static const cairo_uint64_t uint64_carry32
Definition: cairo-wideint.c:84
static cairo_uint64_t uint64_shift32(cairo_uint64_t i)
Definition: cairo-wideint.c:75
#define uint32_hi(i)
#define b
Definition: jpegint.h:372
int v
Definition: dviconv.c:10
int h
Definition: dviconv.c:9
#define shift
Definition: exp3.c:154
#define s
Definition: afcover.h:80
#define r1
#define r3
#define r2
#define r0
#define a(n)
Definition: gpos-common.c:148
small capitals from c petite p scientific f u
Definition: afcover.h:88
small capitals from c petite p scientific i
Definition: afcover.h:80
kerning y
Definition: ttdriver.c:212
#define INT32_MAX
Definition: stdint.h:137
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
int den
Definition: dvi.c:19
int num
Definition: disdvi.c:621
float x
Definition: cordic.py:15
unsigned char bit
Definition: pbm.h:9
#define B(x, y)
int r
Definition: ppmqvga.c:68
#define uint32_t
Definition: stdint.in.h:168
cairo_fixed_t quo
cairo_fixed_t rem