MATLAB and rounding
이전 댓글 표시
Hi! I'm a novice in MATLAB. I have a simple problem:
> x=9.459012348 > y=9.459012347
> x-y
ans =
1.000000082740371e-009
Hmmm... Why I get that "...82740371"? Thank you very much.
답변 (2개)
Oleg Komarov
2011년 7월 2일
1 개 추천
x-y cannot be represented exactly in binary form, thus it approximates the result.
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!