Cached inverse function implemented