Standard JCR-SQL2 has a CAST(value AS DOUBLE)
expression, but unfortunately it can only be used on the right-hand side of an expression. Yes, JCR-SQL2 is not nearly as flexible as normal SQL.
To my knowledge, there is not really a valid standard way to convert the property value to a double before running the comparison. If you cast the double value to a string, you'll get a lexicographical comparison -- which of course won't really be very useful.
I'm not sure about other implementations, but ModeShape would convert the property value to a double when the property is a residual property, since a residual property has no definition and therefore not type. It's quite likely that other implementations would not behave like this.