Created
November 29, 2017 22:03
-
-
Save joelandman/191bf56e64d8393ff79057480aae0ce5 to your computer and use it in GitHub Desktop.
Julia code for overflow play
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env julia | |
x = "1234" | |
while length(x) < 100 * 1024 | |
x *= x; | |
end | |
y = parse(BigInt,x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
julia> x = "1234"
"1234"
julia> while length(x) < 100 * 1024
x *= x;
end
julia> x
"123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123
...
123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234
julia> y=parse(BigInt,x)
1234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234
...
1234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234123412341234