Attempt to implement HTML specs for parsing floating-point number https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#rules-for-parsing-floating-point-number-values