On Wednesday, 30 November 2022 at 03:19:49 UTC, Basile B. wrote:
writeln((3000000000LU + 3000000000LU) % uint.max);
It's actuallywriteln((3000000000LU + 3000000000LU) % (uint.max.to!ulong + 1));
or writeln((3000000000LU + 3000000000LU) & uint.max);
Siarhei Siamashka via Digitalmars-d-learn Tue, 29 Nov 2022 19:34:10 -0800
On Wednesday, 30 November 2022 at 03:19:49 UTC, Basile B. wrote:
writeln((3000000000LU + 3000000000LU) % uint.max);
It's actuallywriteln((3000000000LU + 3000000000LU) % (uint.max.to!ulong + 1));
or writeln((3000000000LU + 3000000000LU) & uint.max);