[Libre-soc-bugs] [Bug 176] partitioned dynamic bool/all/any/xor operators

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sat Jan 16 18:40:37 GMT 2021


https://bugs.libre-soc.org/show_bug.cgi?id=176

--- Comment #11 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
index 53561d4..ed221d3 100644
--- a/src/ieee754/part/partsig.py
+++ b/src/ieee754/part/partsig.py
@@ -281,6 +281,7 @@ class PartitionedSignal:
         Value, out
             ``1`` if any bits are set, ``0`` otherwise.
         """
+        return self != Const(0) # leverage the __ne__ operator here

pranav, you see how the any() operator was as simple as comparing "not equal
to zero"?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list