ref: 35065b9127adf06b0a19286ff7ccc87f14cff10d
parent: 8dc43a951c051422a63b4ed6298bf84c0896edc2
author: aiju <devnull@localhost>
date: Fri May 4 17:41:16 EDT 2018
mpmagadd: force output sign +1 always
--- a/sys/src/libmp/port/mpadd.c
+++ b/sys/src/libmp/port/mpadd.c
@@ -21,10 +21,12 @@
m = b2->top;
if(n == 0){
mpassign(mpzero, sum);
+ sum->sign = 1;
return;
}
if(m == 0){
mpassign(b1, sum);
+ sum->sign = 1;
return;
}
mpbits(sum, (n+1)*Dbits);