projects
/
ieee754fpu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4a692c
)
whoops FP16 mantissa off-by-one
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 19 Feb 2019 08:05:29 +0000
(08:05 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 19 Feb 2019 08:05:29 +0000
(08:05 +0000)
src/add/fpbase.py
patch
|
blob
|
history
diff --git
a/src/add/fpbase.py
b/src/add/fpbase.py
index 5c303046ccedf6376a08f428927272003fbfb83f..e6222c2fa5bb3e2d94fe3f99312825ca6bcac024 100644
(file)
--- a/
src/add/fpbase.py
+++ b/
src/add/fpbase.py
@@
-70,7
+70,7
@@
class FPNum:
"""
def __init__(self, width, m_extra=True):
self.width = width
- m_width = {16: 1
2
, 32: 24, 64: 53}[width] # 1 extra bit (overflow)
+ m_width = {16: 1
1
, 32: 24, 64: 53}[width] # 1 extra bit (overflow)
e_width = {16: 7, 32: 10, 64: 13}[width] # 2 extra bits (overflow)
e_max = 1<<(e_width-3)
self.rmw = m_width # real mantissa width (not including extras)