diff options
| author | Adam Izraelevitz | 2016-09-22 13:08:32 -0700 |
|---|---|---|
| committer | Jack Koenig | 2016-09-22 13:08:32 -0700 |
| commit | 24ffde94c89ef67eed4df30ba49ccf48ca46c9a9 (patch) | |
| tree | e00151cd32f8ce326778662e2a1755e76a21990c /spec | |
| parent | 8b12dcbb76896a19f95dc4da19b3b8c74c1ddda3 (diff) | |
Fixed width inference for add, sub (#312)
Fixes #308
Fixes #193
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/spec.tex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/spec.tex b/spec/spec.tex index 14f5ce11..f6605aae 100644 --- a/spec/spec.tex +++ b/spec/spec.tex @@ -1197,8 +1197,8 @@ Notationally, the width of an argument \vv{e} is represented as \vv{w}\ts{e}. \begin{tabular}{ |c|c|c|c|c|c| } \opheader add & (e1,e2) & () & (UInt,UInt) & UInt & max(w\ts{e1},w\ts{e2})+1\\ - &&& (UInt,SInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\ - &&& (SInt,UInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\ + &&& (UInt,SInt) & SInt & max(w\ts{e1},w\ts{e2}-1)+2\\ + &&& (SInt,UInt) & SInt & max(w\ts{e1}-1,w\ts{e2})+2\\ &&& (SInt,SInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\ \hline \end{tabular} @@ -1214,8 +1214,8 @@ The add operation result is the sum of \vv{e1} and \vv{e2} without loss of preci \begin{tabular}{ |c|c|c|c|c|c| } \opheader sub & (e1,e2) & () & (UInt,UInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\ - &&& (UInt,SInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\ - &&& (SInt,UInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\ + &&& (UInt,SInt) & SInt & max(w\ts{e1}+2,w\ts{e2}+1)\\ + &&& (SInt,UInt) & SInt & max(w\ts{e1}+1,w\ts{e2}+2)\\ &&& (SInt,SInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\ \hline \end{tabular} |
