Calculation error for floor function floor(1.4/0.025)
1 回表示 (過去 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 で Get Started with MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!