Talk:Arithmetic underflow

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

An example could help the reader to understand this term better. If I understand the term right an underflow would occur when 11110000 and 0.0001111 are added on a floating-point computer with 4 significant digits. Please add this example if I am right or a better one.

That would be an example of round-off error, but this article now has a (correct) example. --PeR (talk) 16:12, 14 January 2008 (UTC)[reply]

Replaced most of the article with the FOLDOC entry, which is more clear, and has a good example. Vbucoci 10:17, 15 September 2006 (UTC)[reply]

Underflow not limited to floating point[edit]

The article defines underflow as "the result of a calculation is a number of more precise absolute value than the computer can actually represent" and later elaborates "the true result of a floating point operation is smaller in magnitude (that is, closer to zero) than the smallest value representable [...]". I think the same could be applied to fixed point numbers. For example dividing 16 bit fixed point mantissa 0x0001 by two also results in a mantissa smaller in magnitude (that is, closer to zero) than the smallest value representable (provided the fixed point exponent cannot be changed, e.g., because we also have to represent larger fixed point mantissas like 0x7fff with the same exponent).

Therefore, while the floating point example is a reasonable illustration the statement in the article "The term underflow normally refers to floating point numbers only" is surprising. At least it is provided without any references. May be any term normally refers to floating point numbers because most people are never using anything else than floating point numbers?

Of course, we have do distinguish from overflow, which is discussed in this context and is mainly an integer and fixed point issue. --153.96.175.18 (talk) 11:21, 29 March 2022 (UTC)[reply]

Uncited claims that "underflow" refers exclusively to floating point values[edit]

This article makes some rather bold claims and provides no citations to justify those claims (to which I've added "citation needed"):

Storing values that are too low in an integer variable (e.g., attempting to store −1 in an unsigned integer) is properly referred to as integer overflow[citation needed], or more broadly, integer wraparound. The term underflow normally refers to floating point numbers only, which is a separate issue.

I would argue that "integer underflow" has well-established usage describe this condition as can be substantiated from first-party sources: https://cwe.mitre.org/data/definitions/191.html

I noticed this claim on the Integer overflow page:

The term underflow is most commonly used for floating-point math and not for integer math.[4] However, many references can be found to integer underflow.[5][6][7][8][9]

It provides 5 citations for "integer underflow", and only one source claiming that "underflow" does not apply to integer math. What was the [4] source making such a claim, in disagreement with the others? Why, it's this very article on Arithmetic underflow! This feels like a definition that only comes from a Wikipedia game of telephone, not from a first-party source.

Unless it is updated with any citation whatsoever to substantiate its rather bold claim, I think the original language should be removed as it's unverifiable via a first-party source.

Tarcieri (talk) 14:11, 6 December 2023 (UTC)[reply]