diff options
author | aiju <devnull@localhost> | 2016-08-08 00:54:45 +0200 |
---|---|---|
committer | aiju <devnull@localhost> | 2016-08-08 00:54:45 +0200 |
commit | c6318ecb170c90e0eb336eeed16ca4755f99eee6 (patch) | |
tree | 590ebc58cf9e52b84331ab9f7065ea68d9581117 /sys/src/libmp | |
parent | 333468d668d5079bcf7651d4e25d688b6e7a833e (diff) |
mptrunc: normalize after mpassign to handle the case b==r
Diffstat (limited to 'sys/src/libmp')
-rw-r--r-- | sys/src/libmp/port/mplogic.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/libmp/port/mplogic.c b/sys/src/libmp/port/mplogic.c index 22b61827b..3dd9be2ab 100644 --- a/sys/src/libmp/port/mplogic.c +++ b/sys/src/libmp/port/mplogic.c @@ -153,6 +153,7 @@ mptrunc(mpint *b, int n, mpint *r) }else if(b->sign == 1){ if(d >= b->top){ mpassign(b, r); + mpnorm(r); return; } if(b != r) |