From: Luke Kenneth Casson Leighton Date: Fri, 21 Feb 2020 16:08:16 +0000 (+0000) Subject: zero carry-in on __neg__ X-Git-Tag: ls180-24jan2020~131 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=71b1f65c9c7c492bbea46e641a16db4b0870880e;p=ieee754fpu.git zero carry-in on __neg__ --- diff --git a/src/ieee754/part/partsig.py b/src/ieee754/part/partsig.py index 75417cfd..4a2e611b 100644 --- a/src/ieee754/part/partsig.py +++ b/src/ieee754/part/partsig.py @@ -64,7 +64,8 @@ class PartitionedSignal: # unary ops that require partitioning def __neg__(self): - result, _ = self.add_op(self, ~0, carry=0) # TODO, subop + z = Const(0, self.sig.shape()) + result, _ = self.add_op(self, ~0, carry=z) # TODO, subop return result # binary ops that don't require partitioning