return m, r, exponent >> 1
+#normalization function
+def normalise(s, m, e, lowbits):
+ if (lowbits >= 2):
+ m += 1
+ if get_mantissa(m) == ((1<<24)-1):
+ e += 1
+ return s, m, e
+
+
def fsqrt_test(x):
xbits = x.bits
sm >>= 2
sm = get_mantissa(sm)
#sm += 2
+
+ s, sm, se = normalise(s, sm, se, lowbits)
+
print("our sqrt", s, se, sm, hex(sm), bin(sm), "lowbits", lowbits,
"rem", hex(sr))
if lowbits >= 2:
fsqrt_test(x)
-#normalization function
-def normalise(s, m, e):
- if (lowbits >= 2):
- m += 1
- if get_mantissa(m) == ((1<<24)-1):
- e += 1
-
"""