What is Underflow and overflow??

15 visualizaciones (últimos 30 días)
Victor Seaw
Victor Seaw el 13 de Jun. de 2015
Comentada: Walter Roberson el 13 de Jun. de 2015
Like the title said what is underflow and overflow? if 1000^-500 is this underflow? what about -1000^500?? underflow too??

Respuestas (1)

Walter Roberson
Walter Roberson el 13 de Jun. de 2015
  8 comentarios
Victor Seaw
Victor Seaw el 13 de Jun. de 2015
ehm okay but what does these gotta do with underflow/overflow?? Im really sorry im a very slow learner
Walter Roberson
Walter Roberson el 13 de Jun. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by