Design a function f such that:

f(f(x)) == 1/x

Where x is a 32 bit float

Or how about

Given a function f, find a function g such that

f(x) == g(g(x))


See Also

Interview question: f(f(n)) == -n

Edit
Report