|
|
|
|
|
by jfoutz
3420 days ago
|
|
And the common example int a = 5;
a = !!a;
printf("%i", a); // -> 1
my handwavy approach, negation is either information preserving, or not. If operations destroy data, you have to be extra careful. I think classical logic runs into some subtlety switching from reals to integers and back to reals - how are you rounding or truncating those values? |
|