You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param c - polynomial coefficients sorted in ascending degree
108
+
* @param x - value at which to evaluate the polynomial
109
+
* @returns evaluated polynomial
110
+
*
111
+
* @example
112
+
* var Float32Array = require( '@stdlib/array/float32' );
113
+
*
114
+
* var v = ns.evalpolyf( new Float32Array( [ 3.0, 2.0, 1.0 ] ), 10.0 ); // 3*10^0 + 2*10^1 + 1*10^2
115
+
* // returns 123.0
116
+
*
117
+
* @example
118
+
* var Float32Array = require( '@stdlib/array/float32' );
119
+
*
120
+
* var polyval = ns.evalpolyf.factory( new Float32Array( [ 3.0, 2.0, 1.0 ] ) );
121
+
*
122
+
* var v = polyval( 10.0 ); // => 3*10^0 + 2*10^1 + 1*10^2
123
+
* // returns 123.0
124
+
*
125
+
* v = polyval( 5.0 ); // => 3*5^0 + 2*5^1 + 1*5^2
126
+
* // returns 38.0
127
+
*/
128
+
evalpolyf: typeofevalpolyf;
129
+
130
+
/**
131
+
* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)) using double-precision floating-point arithmetic.
132
+
*
133
+
* ## Notes
134
+
*
135
+
* - Coefficients should be sorted in ascending degree.
136
+
* - The implementation uses [Horner's rule][horners-method] for efficient computation.
* @param x - value at which to evaluate the rational function
@@ -129,6 +163,46 @@ interface Namespace {
129
163
*/
130
164
evalrational: typeofevalrational;
131
165
166
+
/**
167
+
* Evaluates a rational function (i.e., the ratio of two polynomials described by the coefficients stored in \\(P\\) and \\(Q\\)) using single-precision floating-point arithmetic.
168
+
*
169
+
* ## Notes
170
+
*
171
+
* - Coefficients should be sorted in ascending degree.
172
+
* - The implementation uses [Horner's rule][horners-method] for efficient computation.
0 commit comments