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
commit c4b5abbe43d7c22215ef36ef4f7c1413c975678c | |
Author: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de> | |
Date: Fri Jan 29 10:45:36 2021 +0100 | |
fix data type | |
commit f87842483eee9d158f44d51d4c09662c3cff7526 | |
Author: Martin Kroeker <martin@ruby.chemie.uni-freiburg.de> | |
Date: Fri Jan 29 09:56:12 2021 +0100 |
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 |