correctly parse all integer types. fixes #9289

Used `parseint` and `parsefloat` methods instead of `float64_isvalid`.

I don't like it either. But couldn't find a better way. Using `parse` was worse.