shithub: riscv

Download patch

ref: c6318ecb170c90e0eb336eeed16ca4755f99eee6
parent: 333468d668d5079bcf7651d4e25d688b6e7a833e
author: aiju <devnull@localhost>
date: Sun Aug 7 20:54:45 EDT 2016

mptrunc: normalize after mpassign to handle the case b==r

--- a/sys/src/libmp/port/mplogic.c
+++ b/sys/src/libmp/port/mplogic.c
@@ -153,6 +153,7 @@
 	}else if(b->sign == 1){
 		if(d >= b->top){
 			mpassign(b, r);
+			mpnorm(r);
 			return;
 		}
 		if(b != r)