MATLAB: Help me, not = 0 error Best Answer http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F Related SolutionsMATLAB: Java Error starting in Yosemite Thank you I found the solution here: https://www.mathworks.com/support/bugreports/1098655 MATLAB: Isn’t 95.77-95.68 = exactly 0.09 http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F>> fprintf('%.999g\n', 95.77, 95.68, 95.77-95.68)95.769999999999996020960679743438959121704101562595.680000000000006821210263296961784362792968750.0899999999999891997504164464771747589111328125>> fprintf('%.999g\n', 1/3)0.333333333333333314829616256247390992939472198486328125>> isAlways(1-sym('0.333333333333333314829616256247390992939472198486328125')*3 < eps)ans = logical 1 Related Question
Best Answer