gets slightly off value when summing
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!