Fixed erroneous floating point arithmetic logic when searching for perfect squares