function evalpoly( c, x ) {
	var p;
	var i;

	i = c.length;
	if ( i < 2 || x === 0.0 ) {
		if ( i === 0 ) {
			return 0.0;
		}
		return c[ 0 ];
	}
	i -= 1;
	p = ( c[ i ] * x ) + c[ i-1 ];
	i -= 2;
	while ( i >= 0 ) {
		p = ( p * x ) + c[ i ];
		i -= 1;
	}
	return p;
}
Evaluates a polynomial using double-precision floating-point arithmetic.

## Notes

-   The implementation uses [Horner's rule][horners-method] for efficient computation.

[horners-method]: https://en.wikipedia.org/wiki/Horner%27s_method

@param {NumericArray} c - polynomial coefficients sorted in ascending degree
@param {number} x - value at which to evaluate the polynomial
@returns {number} evaluated polynomial

@example
var v = evalpoly( [ 3.0, 2.0, 1.0 ], 10.0 ); // 3*10^0 + 2*10^1 + 1*10^2
// returns 123.0