You might want to pay attention to this part of the abs() reference page (http://arduino.cc/en/Reference/Abs):
"Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results."
I believe analogRead() would qualify as a function...