gets slightly off value when summing
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!