First and most important thing, regardless of how you code it, feed-forward multilayer neural network won't learn x*y, especially when data are presented in the form of two continious inputs. Reasons: 1). x * y output is unbounded and normal MLP is not suited for learning such functions. At best, it can only approximate some fixed range of x*y, given properly normalized data 2). To properly learn multiplication, one should represent numbers as binary (one digit per input neuron). See this paper for further discussion of using NNs for doing arithmetics.
Conclusion: x*y is a very poor choice for debugging newly implemented neural net. Consider using logic gates such as AND, OR, XOR instead.