How to compare float value

Here is the problem with your code logic. Only compute the voltage value at the time you print it. Keep the raw ADC values as they are read as integers and compare the integers.
There is no comma or any other ASCII character in float. That is put there by the print logic.
Paul