home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,500 of 2,753   
   Kaz Kylheku to Martin Ward   
   Re: Optimization techniques   
   26 Apr 19 21:11:09   
   
   From: 847-115-0292@kylheku.com   
      
   On 2019-04-26, Martin Ward  wrote:   
   > On 23/04/19 08:43, David Brown wrote:   
   >> But mathematical identities such as associativity and commutativity are   
   >> valid because signed integer overflow does not happen - thus "a * (b +   
   >> c)" can be changed to "(a * b) + (a * c)".   
   >   
   > If b is large and c has a value close to -b then a * (b + c)   
   > might be OK while (a * b) will overflow and cause undefined   
   > behaviour.   
      
   I.e. careless application of arithmetic identities can introduce   
   overflows that don't exist in the original form.   
      
   --   
   TXR Programming Lanuage: http://nongnu.org/txr   
   Music DIY Mailing List:  http://www.kylheku.com/diy   
   ADA MP-1 Mailing List:   http://www.kylheku.com/mp1   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca