Improve testing of numerical functions and chain