Simplify conversion of strings to floats