Changes to float comparisons and squaring of numbers.

Operators != and ==0 replaced with comparisons with EPS. Replaced pow(x,2) with x*x.