cf for periodic functions.
adding some tests for periodic cf.