Regression by Special Functions: Algorithms and Complexity