Evaluate a nonlinear function