I have a particular adversion to single-letter variable names, especially without a comment that provides a name for them. Also, I would avoid "w2" to mean "w squared" when just a few lines down, you have "x2" which means "the second x".