Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
8
Task/Integer-overflow/Julia/integer-overflow-1.julia
Normal file
8
Task/Integer-overflow/Julia/integer-overflow-1.julia
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
s = subtypes(Signed)
|
||||
u = subtypes(Unsigned)
|
||||
|
||||
println("Integer Type Limits")
|
||||
for i in 1:length(s)
|
||||
println(s[i], " [", typemin(s[i]), ", ", typemax(s[i]), "]")
|
||||
println(u[i], " [", typemin(u[i]), ", ", typemax(u[i]), "]")
|
||||
end
|
||||
5
Task/Integer-overflow/Julia/integer-overflow-2.julia
Normal file
5
Task/Integer-overflow/Julia/integer-overflow-2.julia
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
println("Add to typemax")
|
||||
for t in s
|
||||
over = typemax(t) + 1
|
||||
println(t, " => ", over, " (", typeof(over), ")")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue