# denormalised, correct exponent to zero
with m.If(z.is_denormalised()):
m.d.sync += z.e.eq(z.N127)
- # FIX SIGN BUG: -a + a = +0.
- with m.If((z.e == z.N126) & (z.m[0:] == 0)):
- m.d.sync += z.s.eq(0)
def pack(self, m, z, next_state):
""" packs the result into the output (detects overflow->Inf)