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
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/math/base/tools/chebyshev-series/README.md
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,10 +62,6 @@ var v = chebyshevSeries( 1.0, [ 1.0, 0.5 ] );
62
62
// returns 0.75
63
63
```
64
64
65
-
The input `x` is expected to lie in the interval `[-2, 2]`. The function internally evaluates Chebyshev polynomials at `x/2`.
66
-
67
-
The coefficients `c` should be ordered in **descending** degree.
68
-
69
65
#### chebyshevSeries.factory( c )
70
66
71
67
Uses code generation to in-line coefficients and return a function for evaluating a [Chebyshev series][chebyshev-series] using double-precision floating-point arithmetic.
@@ -86,6 +82,9 @@ var v = evaluate( 1.0 );
86
82
87
83
## Notes
88
84
85
+
- The value at which to evaluate a Chebyshev series is expected to reside on the interval `[-2, 2]`.
86
+
- The function evaluates Chebyshev polynomials at `x/2`.
87
+
- The coefficients `c`**must be** be ordered in **descending** degree.
89
88
- For hot code paths in which coefficients are invariant, a compiled function will be more performant than `chebyshevSeries()`.
90
89
- While code generation can boost performance, its use may be problematic in browser contexts enforcing a strict [content security policy][mdn-csp] (CSP). If running in or targeting an environment with a CSP, avoid using code generation.
91
90
@@ -101,25 +100,23 @@ var v = evaluate( 1.0 );
101
100
102
101
```javascript
103
102
var discreteUniform =require( '@stdlib/random/array/discrete-uniform' );
104
-
var runiform =require( '@stdlib/random/array/uniform' );
105
-
var uniform =require( '@stdlib/random/base/uniform' );
103
+
var uniform =require( '@stdlib/random/array/uniform' );
106
104
var logEachMap =require( '@stdlib/console/log-each-map' );
107
105
var chebyshevSeries =require( '@stdlib/math/base/tools/chebyshev-series' );
108
106
109
107
// Create an array of random coefficients:
110
108
var coef =discreteUniform( 10, -100, 100 );
111
109
112
110
// Evaluate the series at random values using the direct function:
0 commit comments