What is Underflow and overflow??
조회 수: 15 (최근 30일)
이전 댓글 표시
Like the title said what is underflow and overflow? if 1000^-500 is this underflow? what about -1000^500?? underflow too??
댓글 수: 0
답변 (1개)
Walter Roberson
2015년 6월 13일
http://www.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html and scan down to "Largest and smallest"
댓글 수: 8
Walter Roberson
2015년 6월 13일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!