This uses a generic function strto_fp similar to strto_int that is used for strtol and its derivatives.