correctly parse all integer types. fixes #9289

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