From: Aleksandar Kostovic Date: Tue, 30 Apr 2019 14:33:34 +0000 (+0200) Subject: Created the normalise function X-Git-Tag: ls180-24jan2020~1095 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43160e6a268b380f3db92b6c7626123339b93c95;p=ieee754fpu.git Created the normalise function --- diff --git a/src/add/fsqrt.py b/src/add/fsqrt.py index e0696ebc..8e116667 100644 --- a/src/add/fsqrt.py +++ b/src/add/fsqrt.py @@ -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: