mul(a.q,b.q), add(a.q,b.q), sub(a.q,b.q), shl(a.q,b.q)
Posted: Thu Sep 24, 2015 10:24 pm
, shr(a.q.b.q) and IsOverflow().
c=Mul(a,b) -> c=a*b
c=add(a,b) -> c=a+b
c=sub(a,b) -> c=a-b
c=shl(a,b) -> c=a << b
c=shr(a,b) -> c=a >> b
When a Overflow is happend after one of this functions, IsOverflow() should return #true, otherwise #false. The result of MUL() should be identical to a*b, even when a overflow is happend.
btw: shr is neccassary, because shr(%10000000, -63) is possible.
Only for Quads neccassary.
c=Mul(a,b) -> c=a*b
c=add(a,b) -> c=a+b
c=sub(a,b) -> c=a-b
c=shl(a,b) -> c=a << b
c=shr(a,b) -> c=a >> b
When a Overflow is happend after one of this functions, IsOverflow() should return #true, otherwise #false. The result of MUL() should be identical to a*b, even when a overflow is happend.
btw: shr is neccassary, because shr(%10000000, -63) is possible.
Only for Quads neccassary.