Try this: l=. 13 : '(<:y)%^.y' lm=. 13 : 'y*l x%y' f. NB. logarithmic mean lm ] * [: (<: % ^.) % 3 lm 3.000002 3 3 lm 3.00002 3.00001
Thanks. Bo. Den 2:04 mandag den 21. april 2014 skrev Raul Miller <rauldmil...@gmail.com>: On Sun, Apr 20, 2014 at 7:08 PM, Henry Rich <henryhr...@nc.rr.com> wrote: >> More exact equality isn't enough - as you can see from the example, it >> calculates a mean of 2.7 when 3 is the right answer. The problem there is >> roundoff error I expect. > >I doubt the numbers I am working with would have even 10 digits of >accuracy, so I'm actually not too worried. > >Thanks, > > >-- >Raul >---------------------------------------------------------------------- >For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm