What is Underflow and overflow??
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Like the title said what is underflow and overflow? if 1000^-500 is this underflow? what about -1000^500?? underflow too??
0 comentarios
Respuestas (1)
Walter Roberson
el 13 de Jun. de 2015
http://www.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html and scan down to "Largest and smallest"
8 comentarios
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.
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!