What is Underflow and overflow??

15 visualizzazioni (ultimi 30 giorni)
Victor Seaw
Victor Seaw il 13 Giu 2015
Commentato: Walter Roberson il 13 Giu 2015
Like the title said what is underflow and overflow? if 1000^-500 is this underflow? what about -1000^500?? underflow too??

Risposte (1)

Walter Roberson
Walter Roberson il 13 Giu 2015
  8 Commenti
Victor Seaw
Victor Seaw il 13 Giu 2015
ehm okay but what does these gotta do with underflow/overflow?? Im really sorry im a very slow learner
Walter Roberson
Walter Roberson il 13 Giu 2015
The conventions about what "underflow" and "overflow" mean are different between integers and floating point numbers.
For floating point numbers, "underflow" is said to occur when a value is too close to 0 to differentiate it from 0.
For integer class numbers, "underflow" is said to occur when the value would be less than the minimum integer representable in that class.
In every floating point system that I know of, a value that is too close to 0 is made into 0 (though there may be provisions to signal an exception when it happens.)
In the majority of integer representations, a value that is too negative gets converted into a positive value, and a value that is too positive gets converted into a negative value; such systems are said to "wrap around". Those systems are much more common than the way MATLAB does it. An example would be that with 16 bit signed integers, subtracting 1 from -32768 would give you +32767 in those systems, and adding 1 to +32767 would give you -32768.
... Since you asked about underflow and overflow.

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by