From 486d6745fad6f8e16fd9e418847f8ca82a8ea453 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 14 Feb 2019 12:47:12 +0000 Subject: [PATCH] add set-to-zero function --- src/add/nmigen_add_experiment.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 914074c9..ae5d5892 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -47,6 +47,9 @@ class FPNum: def inf(self, s): return self.create(s, 0x80, 0) + def zero(self, s): + return self.create(s, -127, 0) + def is_nan(self): return (self.e == 128) & (self.m != 0) -- 2.30.2