title: Interview question: f(f(x)) == 1/x
body: <blockquote>
  <p>Design a function f such that:</p>
  <p>f(f(x)) == 1/x</p>
  <p>Where x is a 32 bit float</p>
  </blockquote>
  <p>Or how about</p>
  <blockquote>
  <p>Given a function f, find a function g
  such that</p>
  <p>f(x) == g(g(x))</p>
  </blockquote>
  <hr/>
  <h3>See Also</h3>
  <blockquote>
  <p><a href="https://stackoverflow.com/questions/731832/interview-question-ffn-n">Interview question: f(f(n)) == -n</a></p>
  </blockquote>