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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Dec 28 06:24:02 GMT 2020


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

Luke Kenneth Casson Leighton <lkcl at lkcl.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|IN_PROGRESS                 |CONFIRMED

--- Comment #6 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #5)
> ah i just realised, the all() operator is equivalent to "is a ==
> 0b111111111111111111"


https://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/part/partsig.py;h=728764e77f972d75ba0229f4d5e2e821a059ea78;hb=54ebe54bb3dceacfddf376a73088896daf900bc6#l291

pranav this one is dead easy.

  def any(self):
     width = self.sig.shape()[0]
     return self.__eq__(Const(-1, width))

or probably just:

  def any(self):
     return self == Const(-1)


would you like to try writing the (two lines!) some() case?

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


More information about the libre-soc-bugs mailing list