FP functions and test