Esempio n. 1
0
        public double GetValue(double x)
        {
            //Horner's method to calculate value

            Coefficients.Reverse(); //TODO: Change that!

            var result = Coefficients.Aggregate(
                (accumulator, coefficient) => accumulator * x + coefficient);

            Coefficients.Reverse();

            return(result);
        }