I have repeated the test with the sin function and my new version of pso made with TDD is working.