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

test/: avoid integer overflow on 32 bit systems #5360

Merged
merged 1 commit into from
Jan 11, 2014

Conversation

mschauer
Copy link
Contributor

After the fix of #5142 I am running the tests in 32 bit. These are
three smaller fixes to the tests for 32 bit systems fixing tests assuming 64bit ints.

while loading euler.jl, in expression starting on line 70
ERROR: test failed: :((sum(primes(2000000))==142913828922))

while loading ranges.jl, in expression starting on line 105
ERROR: test failed: :((length(1:4:typemax(Int64))==2305843009213693952))

while loading mod2pi.jl, in expression starting on line 193
ERROR: test failed: :((mod2pi(^(2,60))==mod2pi(^(2.0,60))))

One might argue that length(1:4:typemax(Int64)) should actually throw an error as Range.len is of type Int32 there.

ViralBShah added a commit that referenced this pull request Jan 11, 2014
test/: avoid integer overflow on 32 bit systems
@ViralBShah ViralBShah merged commit bf8c1a2 into JuliaLang:master Jan 11, 2014
@mschauer mschauer deleted the fixtests branch January 11, 2014 17:06
@staticfloat
Copy link
Member

Thanks for this, @mschauer!

@mschauer mschauer mentioned this pull request Jan 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants