3 ms·
In general, for any invertible function (or partially invertible function if we can know the input is in the right subset) we need to recognize a rule f⁻¹(f(x))
by o11c 2y ago
In general, for any invertible function (or partially invertible function if we can know the input is in the right subset) we need to recognize a rule f⁻¹(f(x)) === x; note that this usually does not apply when floats are involved.
One interesting case for `f` is the gray code conversion, whose inverse requires a (finite) loop. This can be generalized to shifts other than 1; this is common in components of RNGs.
https://en.wikipedia.org/wiki/Inverse_function https://en.wikipedia.org/wiki/Inverse_function
https://en.wikipedia.org/wiki/Gray_code https://en.wikipedia.org/wiki/Gray_code