qdivrem.c (348238dbd42306d9fb5d89ab393b840572cfeb0f) | qdivrem.c (4a8dea8cf97aab33f4e6a11afcc64dd9562f3bfd) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This software was developed by the Computer Systems Engineering group 6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7 * contributed to Berkeley. 8 * --- 63 unchanged lines hidden (view full) --- 72 * __qdivrem(u, v, rem) returns u/v and, optionally, sets *rem to u%v. 73 * 74 * We do this in base 2-sup-HALF_BITS, so that all intermediate products 75 * fit within u_long. As a consequence, the maximum length dividend and 76 * divisor are 4 `digits' in this base (they are shorter if they have 77 * leading zeros). 78 */ 79u_quad_t | 1/*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This software was developed by the Computer Systems Engineering group 6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7 * contributed to Berkeley. 8 * --- 63 unchanged lines hidden (view full) --- 72 * __qdivrem(u, v, rem) returns u/v and, optionally, sets *rem to u%v. 73 * 74 * We do this in base 2-sup-HALF_BITS, so that all intermediate products 75 * fit within u_long. As a consequence, the maximum length dividend and 76 * divisor are 4 `digits' in this base (they are shorter if they have 77 * leading zeros). 78 */ 79u_quad_t |
80__qdivrem(uq, vq, arq) 81 u_quad_t uq, vq, *arq; | 80__qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq) |
82{ 83 union uu tmp; 84 digit *u, *v, *q; 85 digit v1, v2; 86 u_long qhat, rhat, t; 87 int m, n, d, j, i; 88 digit uspace[5], vspace[5], qspace[5]; 89 --- 185 unchanged lines hidden --- | 81{ 82 union uu tmp; 83 digit *u, *v, *q; 84 digit v1, v2; 85 u_long qhat, rhat, t; 86 int m, n, d, j, i; 87 digit uspace[5], vspace[5], qspace[5]; 88 --- 185 unchanged lines hidden --- |