Calculation error for floor function floor(1.4/0.025)
조회 수: 11 (최근 30일)
이전 댓글 표시
if x = floor(1.4/0.025) is 55 in Matlab, how does y = 1.4/0.025 is 56?
댓글 수: 0
채택된 답변
Iain
2013년 5월 20일
1.4/0.025 actually evaluates to 55.9999999999999928946.
The error is in the FIFTEENTH decimal place, which is an extremely small error, however, it is less than 56, and will "floor" to 55.
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!