Roger, Sorry for the confusion. I did not mean to imply that J should provide the solution to the problems I mentioned. I was so excited to discover that J could express +/@i.n as a 2nd degree polynomial with the t. operator, that I imagined it would be able to do the same for the other examples and exercises of section 11C and 11E of Math for the Layman (by the way, the exercise that started all this is #3 of section 11C, not 11E as indicated in the the Subject of the messages). I just wanted to know if there is a way to define f, g and h below, in such a way that t. would be able to process them.
After trying the polynomial expressions of f, g and ), and based on your answer below, I conclude that +/@:f@:i. is the only member of an infinite class recognized by t. ... which is fine with me. The examples you give are probably impossible to express in polynomial form, anyway. As for the function +/@:(m&p.)@:i , the solution can be found by using the method described in sections 11B and 11C of Math for the Layman, only if m&p. is a first degree polynomial. I am looking at another solution for higher order polynomials. For a little more than a month now, that I have downloaded and started studying J, it has inspired me a renewed interest in Math and computer programming. It is mainly due to the possibility J gives to experiment with advanced math concepts, as shown by K.E. Iverson's article. The article itself is a great review of these concepts that helps me understand them better now than when I studied them 30 year ago. I have to thank the designers and maintainers of this unique and fascinating package for the making it available on the net. Best regards Paul Maurice Original message: > +/@:f@:i. is an infinite class and t. does not recognize all members > of the class. It could conceivably do +/@:(m&p.)@:i. but it has to > stop somewhere. > > +/@:%@:p: @:i. > +/@:%@:fib@:i. NB. open problem > > > > > ----- Original Message ----- > From: "Paul" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Wednesday, May 03, 2006 10:53 PM > Subject: [Jprogramming] K. E. Iverson's Math for the Layman, section > 11E,exercise 3 . . . > f =: +/ @: (2: * i.) NB. sum of first n even numbers (starting at 0) . . . > g =: +/ @: (1: + 2: * i.) NB. sum of first n odd numbers . . . > h =: +/ @: *: @: i. NB. sum of square of first n numbers (starting at 0) . . . > What am I doing wrong? Are the functions f g and h defined in a way that is > not acceptable to t. ? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
