Unpredictable results in arithmetic functions, add, subtract

I have had unexpected results in the sum function, it eventually gives the correct result and at other times the result is wrong

Welcome to the community. Please post a screenshot of you blocks and an example that shows the problem