Oleg Kobchenko wrote: > ]phi=: -:1+%:5 > 1.61803 > fc=: <.@((%:5) + phi&*) - 2:
Thanks, Oleg. I was aware of this formulation. I have shift2=:3 : '_2+<.(%:5)+(-:>:%:5)*y' I am most interested in a better version of z and, in general, how to do greedy algorithms in J. Best wishes, John ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
