Ok, re-reading the thread i cant quite tell if the added/removed abs() call fixed it :S
The INF output from what my googling suggested is a divide by zero issue cant really say more about it than that. The use of abs on a double (in theory) shouldn't change the output. Some quick testing suggests it would change the number of decimal places? abs(1.23456789)=1.23 or abs(1.1)=1.10 tested on my nano
Also would very much agree with jremington, MORE PRINT STATMENTS! if something is going wrong will help you find out where.