projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bit operations. Test them (a bit) better.
[u/mdw/catacomb]
/
mp-arith.c
diff --git
a/mp-arith.c
b/mp-arith.c
index
a070675
..
759056b
100644
(file)
--- a/
mp-arith.c
+++ b/
mp-arith.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: mp-arith.c,v 1.1
4 2002/10/15 19:18:31
mdw Exp $
+ * $Id: mp-arith.c,v 1.1
5 2002/10/19 17:56:50
mdw Exp $
*
* Basic arithmetic on multiprecision integers
*
*
* Basic arithmetic on multiprecision integers
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: mp-arith.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: mp-arith.c,v $
+ * Revision 1.15 2002/10/19 17:56:50 mdw
+ * Fix bit operations. Test them (a bit) better.
+ *
* Revision 1.14 2002/10/15 19:18:31 mdw
* New operation to negate numbers.
*
* Revision 1.14 2002/10/15 19:18:31 mdw
* New operation to negate numbers.
*
@@
-318,7
+321,7
@@
mp *mp_neg(mp *d, mp *a)
\
mp *mp_bit##string(mp *d, mp *a, mp *b) \
{ \
\
mp *mp_bit##string(mp *d, mp *a, mp *b) \
{ \
- MP_DEST(d, MAX(MP_LEN(a), MP_LEN(b)),
a->f | b->f);
\
+ MP_DEST(d, MAX(MP_LEN(a), MP_LEN(b)),
(a->f | b->f) & ~MP_NEG);
\
mpx_bit##string(d->v, d->vl, a->v, a->vl, b->v, b->vl); \
d->f = (a->f | b->f) & MP_BURN; \
MP_SHRINK(d); \
mpx_bit##string(d->v, d->vl, a->v, a->vl, b->v, b->vl); \
d->f = (a->f | b->f) & MP_BURN; \
MP_SHRINK(d); \