From daba4a167b8134bdd2ebf709d3458e09fd99ca49 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 16 Jun 2019 13:18:28 +0100 Subject: [PATCH] fpmul specialcase, nan x nan returns 0 nan --- src/ieee754/fpmul/specialcases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ieee754/fpmul/specialcases.py b/src/ieee754/fpmul/specialcases.py index b7a59b37..0149bb3b 100644 --- a/src/ieee754/fpmul/specialcases.py +++ b/src/ieee754/fpmul/specialcases.py @@ -67,7 +67,7 @@ class FPMulSpecialCasesMod(Elaboratable): # if a is NaN or b is NaN return NaN with m.If(abnan): m.d.comb += self.o.out_do_z.eq(1) - m.d.comb += self.o.z.nan(1) + m.d.comb += self.o.z.nan(0) # if a is inf return inf (or NaN) with m.Elif(a1.is_inf): -- 2.30.2