#8 example in chebyshev docstring is incorrect

open
nobody
5
2014-08-12
2009-07-17
Anonymous
No

the example given for using the chebyshev module appears to be a direct copy of the example in section 28.6 of the GSL manual. However, in the main loop, the values of the points at which the approximation is desired are incorrectly specified:

n= 10000
for i in range(100):
x = i * n / 100.

this returns x in the range 0 to 9900, well outside the 0< x< 1 the approximation is specified for. In order to get the same behavior of the C example,

for i in range(n):
x = float(i)/n

will do.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks