Skip to content

Commit f309a23

Browse files
authored
chore: clean-up
Signed-off-by: Athan <kgryte@gmail.com>
1 parent 2b49373 commit f309a23

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

  • lib/node_modules/@stdlib/math/base/tools/chebyshev-series/lib

lib/node_modules/@stdlib/math/base/tools/chebyshev-series/lib/main.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
*
4040
* ## Notes
4141
*
42+
* The function evaluates
43+
*
4244
* ```text
4345
* N-1
4446
* - '
@@ -47,17 +49,17 @@
4749
* i=0
4850
* ```
4951
*
50-
* of Chebyshev polynomials Ti at argument x/2.
51-
*
52-
* Coefficients are stored in reverse order, i.e. the zero order term is last in the array. Note N is the number of coefficients, not the order.
52+
* of Chebyshev polynomials `Ti` at argument `x/2`.
5353
*
54-
* If coefficients are for the interval a to b, x must have been transformed to x -> 2(2x - b - a)/(b-a) before entering the routine. This maps x from (a, b) to (-1, 1), over which the Chebyshev polynomials are defined.
54+
* A few comments:
5555
*
56-
* If the coefficients are for the inverted interval, in which (a, b) is mapped to (1/b, 1/a), the transformation required is x -> 2(2ab/x - b - a)/(b-a). If b is infinity, this becomes x -> 4a/x - 1.
56+
* - Coefficients are stored in reverse order (i.e., the zero order term is last in the array). Note `N` is the number of coefficients, not the order.
57+
* - If coefficients are for the interval `a` to `b`, `x` must have been transformed to `x` -> `2(2x - b - a)/(b-a)` before entering the routine. This maps `x` from `(a, b)` to `(-1, 1)`, over which the Chebyshev polynomials are defined.
58+
* - If the coefficients are for the inverted interval, in which `(a, b)` is mapped to `(1/b, 1/a)`, the transformation required is `x` -> `2(2ab/x - b - a)/(b-a)`. If `b` is infinity, this becomes `x` -> `4a/x - 1`.
5759
*
58-
* ## Speed
60+
* ### Performance
5961
*
60-
* Taking advantage of the recurrence properties of the Chebyshev polynomials, the routine requires one more addition per loop than evaluating a nested polynomial of the same degree.
62+
* - Taking advantage of the recurrence properties of the Chebyshev polynomials, the routine requires one more addition per loop than evaluating a nested polynomial of the same degree.
6163
*
6264
* @param {number} x - evaluation point
6365
* @param {NumericArray} c - series coefficients in descending degree order

0 commit comments

Comments
 (0)