Integer overflow: Difference between revisions

Content deleted Content added
Example: Linked to info on signed integers
Tags: Mobile edit Mobile web edit
Line 63:
| date = 2008-08-22
}}</ref><ref>{{Cite book|authorlink=Benjamin C. Pierce |last=Pierce |first=Benjamin C. |title=Types and Programming Languages |publisher=MIT Press |year=2002 |isbn=0-262-16209-1 |url=http://www.cis.upenn.edu/~bcpierce/tapl/}}</ref><ref>{{Cite journal|last=Wright |first=Andrew K. |author2=[[Matthias Felleisen]] |title=A Syntactic Approach to Type Soundness |journal=Information and Computation |volume=115 |issue=1 |pages=38–94 |year=1994 |url=http://citeseer.ist.psu.edu/wright92syntactic.html |doi=10.1006/inco.1994.1093}}</ref><ref>{{Cite journal|first=Stavros |last=Macrakis |title=Safety and power |journal=ACM SIGSOFT Software Engineering Notes |volume=7 |issue=2 |pages=25–26 |date=April 1982 |url=http://portal.acm.org/citation.cfm?id=1005937.1005941 |format=requires subscription |doi=10.1145/1005937.1005941}}</ref>
 
In Java 8, there are overloaded methods, for example like [https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#addExact-int-int- Math#addExact()], which will throw ArithmeticException in case of overflow.
 
== Example ==