Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readdlm improper handling of Int64 #9289

Closed
dkoslicki opened this issue Dec 10, 2014 · 2 comments
Closed

readdlm improper handling of Int64 #9289

dkoslicki opened this issue Dec 10, 2014 · 2 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior

Comments

@dkoslicki
Copy link

I think this has been mentioned before, but I don't think an issue was submitted (or at least, I couldn't find it).

Namely, readdlm() improperly handles Int64.
For example, given a text file consisting only of the line -9223355253176920979, readdlm gives the following incorrect result:

test=readdlm("test.txt",Int64)
1x1 Array{Int64,2}:
 -922335525317692160
@JeffBezanson JeffBezanson added the kind:bug Indicates an unexpected problem or unintended behavior label Dec 10, 2014
@ViralBShah
Copy link
Member

Cc: @tanmaykm

@tanmaykm
Copy link
Member

I think we should use parseint and parsefloat there instead of float64_isvalid.
Shall update with a PR.

tanmaykm added a commit to tanmaykm/julia that referenced this issue Dec 11, 2014
Used parseint, parsefloat and parse methods instead of float64_isvalid.
Used parse method when an abstract type is specified.
tanmaykm added a commit to tanmaykm/julia that referenced this issue Dec 11, 2014
Used parseint and parsefloat methods instead of float64_isvalid.
tanmaykm added a commit to tanmaykm/julia that referenced this issue Dec 14, 2014
Used parseint instead of float64_isvalid.
tanmaykm added a commit to tanmaykm/julia that referenced this issue Mar 18, 2015
Used tryparse methods instead of float64_isvalid.
If return array is of Any type, try parsing as Int, Bool and Float64 before falling back to substring.
JeffBezanson added a commit that referenced this issue Mar 20, 2015
correctly parse integer types in readdlm. fixes #9289
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants