From 71b1f65c9c7c492bbea46e641a16db4b0870880e Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 21 Feb 2020 16:08:16 +0000 Subject: [PATCH] zero carry-in on __neg__ --- src/ieee754/part/partsig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.30.2