Re: [Jprogramming] Geometric Mean definition ...

2016-08-30 Thread Martin Kreuzer
Don - That's been exacly the idea behind what I called "gm1" (taking the roots first) ... The Log approach "gm2" however proves to be a little bit more effective: 1 timespacex 'gm1 >: ? 6 $~ 2^10' 0.000185607 50816 1 timespacex 'gm2 >: ? 6 $~ 2^10' 0.000110259 42752 -M At 201

Re: [Jprogramming] Geometric Mean definition ...

2016-08-30 Thread dhkelly
How about this-it fits the definition of "nth root of product of n items" gmean =: # %: */ (gmean,gm1)>: ? 6 $~ 637 2.98625 2.98625 (gm0,gm1,gm2,gmean)>:?6$~637 2.97123 2.97123 2.97123 2.97123 (gm0,gm1,gm2,gmean) >:?6$~637 _ 3.04854 3.04854 _ (gmean, gm1)s=:>:?6$~638 _ 3.06565 b=: 638 %:

Re: [Jprogramming] p. bug

2016-08-30 Thread 'Mike Day' via Programming
Also fails in 804 (Windows 10, jqt) and 805 (Windows 10, jqt beta-11) OK for _46 and _47 but not for _49, other things equal. The real value is returned easily (for _48) with Newton-Raphson. Mike On 30/08/2016 14:21, Andrew Nikitin wrote: p. _48 1 0 0 0 1 crashes j. Tried with 803 and earl

[Jprogramming] p. bug

2016-08-30 Thread Andrew Nikitin
p. _48 1 0 0 0 1 crashes j. Tried with 803 and earlier. -- For information about J forums see http://www.jsoftware.com/forums.htm