Small amount of value change in a floating value assignment
조회 수: 1 (최근 30일)
이전 댓글 표시
I found if a floating value is assigned to a variable, sometimes the value will experince a small abount change, as seen below. Why is it like that?
댓글 수: 0
채택된 답변
KSSV
2020년 5월 2일
Floating point numbers are represented in computer in a binary base i.e. in base 2. Most of the times the floating point numbers one enters are exactly not represented in binary and they are approximated to the closest values. You need to read about IEEE 754 floating point number representation to know more. You may read the below link to have some idea.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!