Implemented the parsing function for string to float.