From: Luke Kenneth Casson Leighton Date: Sun, 28 Apr 2019 13:45:03 +0000 (+0100) Subject: add a few comments X-Git-Tag: ls180-24jan2020~1157 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c76f6c047bfb3110d611e9038bc8fd9a1293a73;p=ieee754fpu.git add a few comments --- diff --git a/src/add/fsqrt.py b/src/add/fsqrt.py index 72850314..c2d32a7a 100644 --- a/src/add/fsqrt.py +++ b/src/add/fsqrt.py @@ -16,6 +16,7 @@ def sqrtsimple(num): return res +# XXX DO NOT USE, fails on num=65536. wark-wark... def sqrt(num): D = num # D is input (from num) Q = 0 @@ -59,6 +60,8 @@ def set_exponent(x, e): def get_sign(x): return ((x & 0x80000000) >> 31) +# main function, takes mantissa and exponent as separate arguments +# returns a tuple, sqrt'd mantissa, sqrt'd exponent def main(mantissa, exponent): if exponent & 1 != 0: