On Wednesday, 16 October 2019 at 21:34:35 UTC, Dennis wrote:
Except that e.g. -2 - int.max underflows to int.max suggesting
that int.max < -2.
Eh yeah, it would be something you should check in opCmp.
But this is how it is actually implemented on the processor
itself, just the cpu happens to
On 10/16/2019 02:34 PM, Dennis wrote:
> Except that e.g. -2 - int.max underflows to int.max suggesting that
> int.max < -2.
Timon had corrected me on that point a while back, so I had added the
following warning at
On Wednesday, 16 October 2019 at 20:07:10 UTC, Adam D. Ruppe
wrote:
Notice that the docs say "a negative value" rather than -1
specifically. That's because the implementation for integers an
be as simple as
return a - b; // if b > a, you get a negative value
Except that e.g. -2 - int.max
On Wednesday, 16 October 2019 at 19:25:18 UTC, DNoob wrote:
I'm just learning D, so it's very possible that I'm missing a
more appropriate function that exists elsewhere, but basically
I found today that while I could easily write a cmp function
that worked for everything, the one in
On Wednesday, 16 October 2019 at 19:25:18 UTC, DNoob wrote:
I'm just learning D, so it's very possible that I'm missing a
more appropriate function that exists elsewhere, but basically
I found today that while I could easily write a cmp function
that worked for everything, the one in
I'm just learning D, so it's very possible that I'm missing a
more appropriate function that exists elsewhere, but basically I
found today that while I could easily write a cmp function that
worked for everything, the one in std.algorithm doesn't seem to:
import std.stdio, std.algorithm;