From: Luke Kenneth Casson Leighton Date: Thu, 14 Feb 2019 12:47:01 +0000 (+0000) Subject: fix bug in nan/inf, exp-bias needed subtracting X-Git-Tag: ls180-24jan2020~2000 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a596346d426eb2dac0110759e5d1842ec76340f;p=ieee754fpu.git fix bug in nan/inf, exp-bias needed subtracting --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 68d15bd4..914074c9 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -42,10 +42,10 @@ class FPNum: Cat(self.m[0] | self.m[1], self.m[1:-5], 0)) def nan(self, s): - return self.create(s, 0xff, 1<<22) + return self.create(s, 0x80, 1<<22) def inf(self, s): - return self.create(s, 0xff, 0) + return self.create(s, 0x80, 0) def is_nan(self): return (self.e == 128) & (self.m != 0)