Talk:Formal power series: Difference between revisions

→‎Task and goal: new section
(No functional equations then)
(→‎Task and goal: new section)
Line 44:
::::::My problem is that I don't see what integration of a constant has to do with formal manipulations of Taylor series. Well, constant is a kind of Taylor series. But that looks rather thin to me. It would be better to have a test task with more substance.
::::::Anyway, we seem to agree that this is not about functional equations, but merely about repetitive integration of a constant. The net effect is that laziness and recursion can be thrown over the board and replaced by a plain loop. --[[User:Dmitry-kazakov|Dmitry-kazakov]] 22:21, 18 February 2009 (UTC)
 
== Task and goal ==
 
As far as I can understand it, the task (from the bold '''task''' to the end of paragraph, before "As an example") could be accomplished by implementing a (numerical) method for derivative to compute Taylor coefficients... if the given function is ''derivable'' (he*l I'm not sure this is the right translation) &infty; times in 0; and then implementing operations like + - * / over ''finite'' (only theoretically infinite) vectors (which are nothing but coordinates in a space with basis 1,x,x<sup>2</sup>...)...
 
Until here, everything's fine, we can leave functional programming or lazy evaluation apart: we can just ''register'' a function (e.g. returning an opaque ''handler'' in langs like C) and expand it when needed, truncating the series to N (where N must be choosen smartly, but even roughly, it won't change too much for the task part); or, we can expand it and store the coefficients, truncating the expansion at the ''convenient'' number N... this approach is better for a lot of languages, and the user likely can see the difference (if N is choosen well).
 
But this is about the task part. The example makes it less clear: is it asking just to demonstrate that the integral we implemented works fine? I.e. we find the coeffs for sin, then the coeffs for cos, then we compute integral of cos (using the new type) &mdash;or the derivative of sin...&mdash; and we show that the coeffs are the same of sin...? (then in the example we did not need to use a definite integral for this)
 
At the end, the goal can be easily missed even accomplishing the task part: how langs handle "new numeric types" is already shown in other tasks (at least one, [[Rational Arithmetic]]); and delayed/lazy evaluation, which is not usable (''directly'') by every language, is also not strictly needed.
 
Summarizing: is the task accomplished even if the goals are (partially) missed? --[[User:ShinTakezou|ShinTakezou]] 17:30, 9 March 2009 (UTC)