I have a function that has exponential complexity (the contents of which cannot be modified):
void exponential_func(in