Is inexact subtraction expected?

2 ビュー (過去 30 日間)
Guy
Guy 2020 年 6 月 18 日
回答済み: Image Analyst 2020 年 6 月 18 日
In Matlab R2018a, I just typed "32885.6-32760" and got back 125.599999999999. Is this type of inexact subtraction expected? If I then type "ans - 125" I get 0.599999999998545, so it's not just a bunch of 9's. Removing the leading 3 or the leading 32 does not give this incorrect answer (i.e. it gives the exact decimal value .6)

回答 (1 件)

Image Analyst
Image Analyst 2020 年 6 月 18 日

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by