Result of substracting 2 non-equal doubles = 0

 
Hello there, I've got some weird math here. Somehow substracting a double from a double, which are never equal BTW, produces zero. Could please someone explain this phenomena? Below is the code and output. double sixtySMABuffer[]; double sixtySMALowerBandBuffer[]; int init() { SetIndexBuffer(0,sixtySMABuffer); SetIndexBuffer(1,sixtySMALowerBandBuffer); ........... } int start(){ ......... double deviation = 0.0010; for(i = 0; i = limit; i++) { sixtySMABuffer[i] = iMA(NULL, 0, SMA_PERIOD, 0, MODE_SMA, PRICE_CLOSE, i); sixtySMALowerBandBuffer[i] = sixtySMABuffer[i] - deviation; Print(sixtySMABuffer[i] + " : " + sixtySMALowerBandBuffer[i]); ............ } ......... } Print Output : 16:30:09 AUDUSD,M30: 0.77431333 : 0.00000000 16:30:09 AUDUSD,M30: 0.77433500 : 0.00000000 16:30:09 AUDUSD,M30: 0.77434500 : 0.00000000
 
Apparently, using a temporary "buffering" varible instead of direct assignment to the array element allows to solve the problem i.e. double temporaryValue = sixtySMABuffer[i] - deviation; sixtySMALowerBandBuffer[i] = temporaryValue; Go figure...
Reason: