ref: a37a13074c443c7104016187daad1e8171f0adc8
parent: cd15849bf2359dbd7868dcfd4f85c7da6d46f396
author: aiju <devnull@localhost>
date: Tue Dec 20 13:33:58 EST 2016
mpxor: sign should be 1/-1, not 0/-1
--- a/sys/src/libmp/port/mplogic.c
+++ b/sys/src/libmp/port/mplogic.c
@@ -104,7 +104,7 @@
b2 = t;
}
fl = (b1->sign & 10) ^ (b2->sign & 12);
- sum->sign = (int)(fl << 28) >> 31;
+ sum->sign = (int)(fl << 28) >> 31 | 1;
mpbits(sum, b1->top*Dbits);
dp1 = b1->p;
dp2 = b2->p;