From 24ffde94c89ef67eed4df30ba49ccf48ca46c9a9 Mon Sep 17 00:00:00 2001 From: Adam Izraelevitz Date: Thu, 22 Sep 2016 13:08:32 -0700 Subject: Fixed width inference for add, sub (#312) Fixes #308 Fixes #193 --- spec/spec.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec') 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} -- cgit v1.2.3