Created small test for decode_fp32 function
authorAleksandar Kostovic <alexandar.kostovic@gmail.com>
Mon, 29 Apr 2019 06:50:53 +0000 (08:50 +0200)
committerAleksandar Kostovic <alexandar.kostovic@gmail.com>
Mon, 29 Apr 2019 06:50:53 +0000 (08:50 +0200)
src/add/fsqrt.py

index bc80e9f5ef9ca2464bb2adf56629a4fc415e60d8..da3819c17a6d6877c885793177dc9ae0a6da7f60 100644 (file)
@@ -1,3 +1,6 @@
+from sfpy import Float32
+
+
 # XXX DO NOT USE, fails on num=65536.  wark-wark...
 def sqrtsimple(num):
     res = 0
@@ -96,6 +99,13 @@ if __name__ == '__main__':
             ms, es = main(m, e)
             print("m:%d e:%d sqrt: m:%d e:%d" % (m, e, ms, es))
 
+
+
+x = Float32(1234.123456789)
+xbits = x.bits
+    
+
+print(decode_fp32(x))
 """
 
 Notes: