Talk:Chebyshev coefficients: Difference between revisions

From Rosetta Code
Content added Content deleted
Line 10: Line 10:


Or alternatively, Clenshaw's recurrence might be added as a separate task, with the two tasks exchanging data and results. —[[User:Sonia|Sonia]] ([[User talk:Sonia|talk]]) 15:56, 21 August 2015 (UTC)
Or alternatively, Clenshaw's recurrence might be added as a separate task, with the two tasks exchanging data and results. —[[User:Sonia|Sonia]] ([[User talk:Sonia|talk]]) 15:56, 21 August 2015 (UTC)

== Wikipedia doesn't seem to agree with Numerical Recipies ==

See https://en.wikipedia.org/wiki/Chebyshev_polynomials#Example_1. WP has that extra Kronecker delta that effectively divides the first term by 2, which, if I understand, gets the absolute value of that first coefficient <= 1. Am I reading that right? NR may have a pair of functions that generate and then evaluate an approximating polynomial, but if it's a variant of Chebychev, I'd prefer that we show the more mathematically correct functions. &mdash;[[User:Sonia|Sonia]] ([[User talk:Sonia|talk]]) 16:15, 21 August 2015 (UTC)

Revision as of 16:15, 21 August 2015

C example is copyrighted

As documented (!) the code is straight from NR in C and should be removed. —Sonia (talk) 15:57, 21 August 2015 (UTC)

Verify correct output.

All examples other than C currently appear derived from C, which has no output. The J example has output for a test case and other examples have reproduced J's result, but some reassurance that the answer is correct would be nice. Numerical Recipes in C goes on to provide Chebyshev evaluation function. The task would be much more meaningful if the evaluation function were required also, with required output showing that the coefficents and evaluation function do accurately approximate some values of the original function.

Alternatively, task authors could code the evaluation function, run a test case through it, verify that it all works and then add the specific coefficents to the task description as required output.

Or alternatively, Clenshaw's recurrence might be added as a separate task, with the two tasks exchanging data and results. —Sonia (talk) 15:56, 21 August 2015 (UTC)

Wikipedia doesn't seem to agree with Numerical Recipies

See https://en.wikipedia.org/wiki/Chebyshev_polynomials#Example_1. WP has that extra Kronecker delta that effectively divides the first term by 2, which, if I understand, gets the absolute value of that first coefficient <= 1. Am I reading that right? NR may have a pair of functions that generate and then evaluate an approximating polynomial, but if it's a variant of Chebychev, I'd prefer that we show the more mathematically correct functions. —Sonia (talk) 16:15, 21 August 2015 (UTC)