Is a Function Periodic?