Fix #408: Reject invalid strings when parsing numbers
Merge pull request #480 from gzm0/parse-float

Fix #408: Reject invalid strings when parsing Double and Float