qdivrem.c (c6879c6c14eedbd060ba588a3129a6c60ebbe783) qdivrem.c (feb1d5507e4730fe401e6ae28a56579b814519ef)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This software was developed by the Computer Systems Engineering group
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and

--- 32 unchanged lines hidden (view full) ---

41
42/*
43 * Multiprecision divide. This algorithm is from Knuth vol. 2 (2nd ed),
44 * section 4.3.1, pp. 257--259.
45 */
46
47#include "quad.h"
48
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This software was developed by the Computer Systems Engineering group
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and

--- 32 unchanged lines hidden (view full) ---

41
42/*
43 * Multiprecision divide. This algorithm is from Knuth vol. 2 (2nd ed),
44 * section 4.3.1, pp. 257--259.
45 */
46
47#include "quad.h"
48
49#define B (1 << HALF_BITS) /* digit base */
49#define B (1L << HALF_BITS) /* digit base */
50
51/* Combine two `digits' to make a single two-digit number. */
52#define COMBINE(a, b) (((u_long)(a) << HALF_BITS) | (b))
53
54/* select a type for digits in base B: use unsigned short if they fit */
55#if ULONG_MAX == 0xffffffff && USHRT_MAX >= 0xffff
56typedef unsigned short digit;
57#else

--- 221 unchanged lines hidden ---
50
51/* Combine two `digits' to make a single two-digit number. */
52#define COMBINE(a, b) (((u_long)(a) << HALF_BITS) | (b))
53
54/* select a type for digits in base B: use unsigned short if they fit */
55#if ULONG_MAX == 0xffffffff && USHRT_MAX >= 0xffff
56typedef unsigned short digit;
57#else

--- 221 unchanged lines hidden ---