in reply to Re: number comparison with a twist
in thread number comparison with a twist

I like this answer.
The input is NOT a float, it is a string of decimal digits which could potentially be represented by a binary float.
I would move the decimal 2 places to the right, 12.=>1200, 12.3=>1230 and see if any non-zero digits remain. If so, there are going to be problems when comparing numbers. I would not convert "12.30" to a float unless you have to.

This API is giving the OP a decimal character string instead of a much more compact, efficient binary float. I suspect that there are reasons behind that the OP hasn't told us. This string could have come from some BCD (Binary Coded Decimal) calculation or whatever. I have never written any BCD code, but yes there are math operations that modern processors can do on arrays of BCD's (every 4 bits only goes 0-9 instead of 0-F).