Extra warnings for the debug build: -Wfloat-equal -Wconversion. The code was fixed accordingly. No broken tests.