Created the normalise function
authorAleksandar Kostovic <alexandar.kostovic@gmail.com>
Tue, 30 Apr 2019 14:33:34 +0000 (16:33 +0200)
committerAleksandar Kostovic <alexandar.kostovic@gmail.com>
Tue, 30 Apr 2019 14:33:34 +0000 (16:33 +0200)
src/add/fsqrt.py

index e0696ebcdbdce37e8df41f9dec58b42f620b5036..8e11666705d85aedcdae3c07fa9bb76faee1994f 100644 (file)
@@ -140,6 +140,16 @@ if __name__ == '__main__':
     x = Float32(0.123456)
     fsqrt_test(x)
 
+
+#normalization function
+def normalise(s, m, e):
+    if (lowbits >= 2):
+        m += 1
+    if get_mantissa(m) == ((1<<24)-1):
+        e += 1
+
+
+
 """
 
 Notes: