Integer overflow: Difference between revisions

Content deleted Content added
Line 18:
In [[computer graphics]] or [[signal processing]], it is typical to work on data that ranges from 0 to 1 or from -1 to 1. An example of this is a [[grayscale]] image where 0 represents black, 1 represents white, and values in-between represent varying shades of gray. One operation that one may want to support is brightening the image by multiplying every pixel by a constant. [[Saturated arithmetic]] allows one to just blindly multiply every [[pixel]] by that constant without worrying about overflow by just sticking to a reasonable outcome that all these pixels larger than 1 (i.e. [[high dynamic range imaging|"brighter than white"]]) just become white and all values "darker than black" just become black.
 
==Classic ErrorInteger-overflow Exception==
System.Overflow: Arithmetic operation resulted in an overflow.<br>
at Microsoft.VisualBasic.CompilerServices.IntegerType.FromString(String Value)<br>