Jump to content

Talk:Integer overflow

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 77.102.82.101 (talk) at 16:01, 12 November 2017 (prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prndl1l2prnd...). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputer security: Computing Start‑class
WikiProject iconThis article is within the scope of WikiProject Computer security, a collaborative effort to improve the coverage of computer security on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
???This article has not yet received a rating on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Computing.
Things you can help WikiProject Computer security with:
Article alerts are available, updated by AAlertBot. More information...
  • Review importance and quality of existing articles
  • Identify categories related to Computer Security
  • Tag related articles
  • Identify articles for creation (see also: Article requests)
  • Identify articles for improvement
  • Create the Project Navigation Box including lists of adopted articles, requested articles, reviewed articles, etc.
  • Find editors who have shown interest in this subject and ask them to take a look here.

Prndl1l2?

What does prndl1l2 mean?

[Untitled]

Integer arithmetics are frequently used in computer programs on all types of systems, since floating-point operations may incur higher overhead (depending on processor capabilities).

Floating-point operations may or may not actually be more expensive than integer arithmetic on given hardware. I think there are much better reasons to use integers instead of floats: integers are exact and give you more precision than floats of the same size. For example, in a 32-bit integer, you get 32 bits of precision, whereas an IEEE single precision float, which also takes 32 bits, provides only 24 bits of precision (23 bits mantissa, and the sign bit). When the numbers you're trying to represent are integers (or even rationals with a common denominator), you're therefore better off using ints.

Inglorion 09:27, 19 August 2006 (UTC)[reply]

Integer overflow is a special case of arithmetic overflow. I don't see the need for two articles. Derek farn 08:54, 10 October 2006 (UTC)[reply]

I think this makes sense as two different articles. Integer overflow is of particular interest in computer security and is reference from the computer security page. The content on this article is currently underdeveloped and could be significantly expanded. Rcseacord 18:10, 12 December 2006 (UTC)[reply]

But, currently, the arithmetic overflow page adds no significant value, and only confuses because there is no obvious difference between integer overflow and arithmetic overflow. In fact, the first line of 'integer overflow' says "an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is too large to be represented...", which is exactly the definition of arithmetic overflow. Until there is something in the two articles that shows a difference between these two terms, they really should be merged. 141.166.41.125 (talk) 21:05, 6 September 2015 (UTC)[reply]

Note to self. -- C. A. Russell (talk) 19:08, 9 May 2009 (UTC)[reply]

Wrap around, Signed/Unsigned, mixed message

From the article:

Since an arithmetic operation may produce a result larger than the maximum representable value, a potential error condition may result. In the C programming language, signed integer overflow causes undefined behavior, while unsigned integer overflow causes the number to be reduced modulo a power of two, meaning that unsigned integers "wrap around" on overflow. This "wrap around" is the cause of the famous "Split Screen" in Pac-Man.
A "wrap around" corresponds to the fact, that e.g. if the addition of two positive integers produces an overflow, it may result in a negative number. In counting, one just starts over again from the bottom.
Example: 16 bit signed integer: 30000 + 30000 = −5536.

The example given here of a negative number resulting from addition is an example of a signed integer overflow, but its usage immediately after the statement about C programming behavior is contradictory. I don't know enough about C programming to know whether the statement that "signed overflow produces undefined behavior, while unsigned overflow produces wrap around" is accurate or transposed. If it is accurate, the example should be changed to, perhaps, 35000 + 35000 = 4464; otherwise, the words "signed" and "unsigned" words should be swapped to be accurate in the preceding statement. 199.2.205.141 (talk) 14:15, 29 October 2013 (UTC)[reply]

Signed overflow is undefined in C. I changed the example to prevent confusion. Hiiiiiiiiiiiiiiiiiiiii (talk) 01:52, 13 January 2014 (UTC)[reply]

Merger proposal

I propose that Arithmetic overflow be merged into Integer overflow. The arithmetic overflow article is short and underdeveloped, and duplicates the material in integer overflow. Ads they currently stand, there is no apparent difference in definition between the two terms. 141.166.41.125 (talk) 21:05, 6 September 2015 (UTC)[reply]

I agree Mchcopl (talk) 18:42, 12 April 2016 (UTC)![reply]

I agree. This needs to be acted on. 98.122.177.25 (talk) 20:14, 12 July 2016 (UTC)[reply]