Created
September 20, 2017 20:48
-
-
Save omus/21d00be0977d295d6edd94c8c908c308 to your computer and use it in GitHub Desktop.
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
Ts = sort!(Base.uniontypes(Base.BitInteger), by=T->(!(T<:Signed),sizeof(T))); | |
for (i, T) in enumerate(Ts), (j, S) in enumerate(Ts) | |
i < j || continue | |
(T <: Signed) ⊻ (S <: Signed) || continue | |
P = promote_type(T, S) | |
@printf "%-7s + %-7s => %-7s\n" T S P | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment