projects
/
ieee754fpu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9993e43
)
zero carry-in on __neg__
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 21 Feb 2020 16:08:16 +0000
(16:08 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Fri, 21 Feb 2020 16:08:16 +0000
(16:08 +0000)
src/ieee754/part/partsig.py
patch
|
blob
|
history
diff --git
a/src/ieee754/part/partsig.py
b/src/ieee754/part/partsig.py
index 75417cfdb06c121613c0883a709779bd205131bd..4a2e611baa8ba2cdbc1995dee9eb002442d474e2 100644
(file)
--- 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