gets slightly off value when summing
古いコメントを表示
I found this problem
>> p1
p1 =
0.0050
>> p2
p2 =
0.0450
>> p1+p2 - 0.05
ans =
-6.9389e-18
Obviously p1 + p2 is 0.05 but I think due to loss of data when summed the result is not exactly equal to 0.05. Is there a way to fix this (as in, how do i restore p1+p2 to 0.05)? the code above is not what I am using, it's only for reference. Thanks in advance.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!