From 7c76f6c047bfb3110d611e9038bc8fd9a1293a73 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 28 Apr 2019 14:45:03 +0100 Subject: [PATCH] add a few comments --- src/add/fsqrt.py | 3 +++ 1 file changed, 3 insertions(+) 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: -- 2.30.2