https://issues.dlang.org/show_bug.cgi?id=12974
safety0ff.bugz <safety0ff.b...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|All |x86_64 --- Comment #6 from safety0ff.bugz <safety0ff.b...@gmail.com> --- (In reply to bearophile_hugs from comment #5) > While this shows the problem: > > void main() { > import std.math; > ulong X = uint.max; > assert(X ^^ 2uL == 18446744065119617025uL); // OK > assert(ulong(uint.max) ^^ 2uL == 12157665459056928801uL); // Fails > } Bah, I screwed up the constants, that second constant is the one for 3^40. The bug is still there on 64bit once I fixed the constants. http://dpaste.dzfl.pl/51133cbb1d74 Marking as 64 bit only. --