33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
-
-
+
+
+
|
if (a->sign == MP_NEG && (a->used > 1 || a->dp[0] >= b)) {
/* temporarily fix sign of a */
a->sign = MP_ZPOS;
/* c = |a| - b */
res = mp_sub_d(a, b, c);
/* fix sign */
a->sign = c->sign = MP_NEG;
/* fix signs */
a->sign = MP_NEG;
c->sign = (c->used) ? MP_NEG : MP_ZPOS;
return res;
}
/* old number of used digits in c */
oldused = c->used;
|
101
102
103
104
105
106
107
108
109
|
102
103
104
105
106
107
108
109
110
|
-
-
+
+
|
return MP_OKAY;
}
#endif
/* $Source: /root/tcl/repos-to-convert/tcl/libtommath/bn_mp_add_d.c,v $ */
/* $Revision: 1.1.1.2 $ */
/* $Date: 2005/09/26 16:31:56 $ */
/* $Revision: 1.2 $ */
/* $Date: 2005/10/08 14:42:54 $ */
|