On Thursday, 27 June 2013 at 15:32:05 UTC, MattCodr wrote:
On Thursday, 27 June 2013 at 12:38:25 UTC, John Colvin wrote:
The question is ambiguous as to what they mean by -n. Do they
mean the result of negation on the 32bit signed int, or do
they mean the negative of the number represented by that int.
this matters because -int.min evaluates to int.min due to
wraparound.
From: February 11, 2008:
Vlad Patryshev said...
...Write a function f on 32-bit integers that, applied twice,
it negates the integer. f(f(n)) = -n.
Source:
http://steve-yegge.blogspot.com.br/2008/02/portrait-of-n00b.html
Matheus.
How is that any more specific?