add comment on what mantissas represent
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Jul 2019 17:44:11 +0000 (18:44 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Jul 2019 17:44:11 +0000 (18:44 +0100)
src/ieee754/fpdiv/div0.py

index 30d92c6d0854f09d308a72ee7ea8709dd4d079ad..90c98847f559575345a98f209e8c9e7592819d00 100644 (file)
@@ -76,6 +76,12 @@ class FPDivStage0Mod(Elaboratable):
             # do conversion here, of both self.i.a and self.i.b,
             # into DivPipeCoreInputData dividend and divisor.
 
+            # the mantissas, having been de-normalised (and containing
+            # a "1" in the MSB) represent numbers in the range 0.5 to
+            # 0.9999999-recurring.  the min and max range of the
+            # result is therefore 0.4999999 (0.5/0.99999) and 1.9999998
+            # (0.99999/0.5).
+
             m.d.comb += [self.o.z.e.eq(self.i.a.e - self.i.b.e + 1),
                          self.o.z.s.eq(self.i.a.s ^ self.i.b.s)
                          self.o.dividend.eq(self.i.a.m), # TODO: check