1 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
2 /* All Rights Reserved */
3
4
5 /*
6 * Copyright (c) 1980 Regents of the University of California.
7 * All rights reserved. The Berkeley software License Agreement
8 * specifies the terms and conditions for redistribution.
9 */
10 /* Portions Copyright(c) 1988, Sun Microsystems Inc. */
11 /* All Rights Reserved */
12
13 /*
14 * Copyright (c) 1997, by Sun Microsystems, Inc.
15 * All rights reserved.
16 */
17
18 #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
19
20 /* LINTLIBRARY */
21
22 #include <mp.h>
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <sys/types.h>
26 #include "libmp.h"
27
28 static void m_div(MINT *, MINT *, MINT *, MINT *);
29
30 void
31 mp_mdiv(MINT *a, MINT *b, MINT *q, MINT *r)
32 {
33 MINT x, y;
34 int sign;
35
36 sign = 1;
37 x.len = y.len = 0;
38 _mp_move(a, &x);
|
1 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
2 /* All Rights Reserved */
3
4
5 /*
6 * Copyright (c) 1980 Regents of the University of California.
7 * All rights reserved. The Berkeley software License Agreement
8 * specifies the terms and conditions for redistribution.
9 */
10 /* Portions Copyright(c) 1988, Sun Microsystems Inc. */
11 /* All Rights Reserved */
12
13 /*
14 * Copyright (c) 1997, by Sun Microsystems, Inc.
15 * All rights reserved.
16 */
17
18 /*
19 * Copyright (c) 2018, Joyent, Inc.
20 */
21
22 /* LINTLIBRARY */
23
24 #include <mp.h>
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <sys/types.h>
28 #include "libmp.h"
29
30 static void m_div(MINT *, MINT *, MINT *, MINT *);
31
32 void
33 mp_mdiv(MINT *a, MINT *b, MINT *q, MINT *r)
34 {
35 MINT x, y;
36 int sign;
37
38 sign = 1;
39 x.len = y.len = 0;
40 _mp_move(a, &x);
|