projects
/
ieee754fpu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da01094
)
add a few comments
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 28 Apr 2019 13:45:03 +0000
(14:45 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 28 Apr 2019 13:45:03 +0000
(14:45 +0100)
src/add/fsqrt.py
patch
|
blob
|
history
diff --git
a/src/add/fsqrt.py
b/src/add/fsqrt.py
index 728503148f0b175a2c60becfa33fb50e9b18354b..c2d32a7acbbdf4c3e3cb84d0465be4ba52bcc392 100644
(file)
--- 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: