Re: [Jprogramming] Geometric Mean definition ...

2016-08-31 Thread dhkelly
thats OK - I understood your meaning. I also enjoyed chasing down the cause Don On 8/31/2016 12:38 AM, Martin Kreuzer wrote: ... and my last remark probably deals more with efficiency than effectiveness -- I sometimes fight for words even in my mother tongue. -M At 2016-08-31 06:33, you wrot

Re: [Jprogramming] Geometric Mean definition ...

2016-08-31 Thread Martin Kreuzer
... and my last remark probably deals more with efficiency than effectiveness -- I sometimes fight for words even in my mother tongue. -M At 2016-08-31 06:33, you wrote: Don - That's been exacly the idea behind what I called "gm1" (taking the roots first) ... The Log approach "gm2" however

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] Geometric Mean definition ...

2016-08-26 Thread Martin Kreuzer
Brian - This of course depends on _both_ the no of elements and their size (the smaller the elements, the higher you can go) (gm0,gm1,gm2) 441#5 5 5 5 (gm0,gm1,gm2) 442#5 _ 5 5 (gm0,gm1,gm2) 396#6 6 6 6 (gm0,gm1,gm2) 397#6 _ 6 6 or, using Raul's argument, it fails at the same ord

Re: [Jprogramming] Geometric Mean definition ...

2016-08-26 Thread Raul Miller
Yes: 5^441 442 1.76105e308 _ Thanks, -- Raul On Fri, Aug 26, 2016 at 5:38 PM, Brian Schott wrote: > Martin, > > Your examples of gm0 failing are not clear to me because you use random > data. > I tried the following nonrandom data, but a sort of random case where the > number of data value

Re: [Jprogramming] Geometric Mean definition ...

2016-08-26 Thread Brian Schott
Martin, Your examples of gm0 failing are not clear to me because you use random data. I tried the following nonrandom data, but a sort of random case where the number of data values seems to be the issue because for samples of 441 and less the failure is not present, but is present for 442 and gre

[Jprogramming] Geometric Mean definition ...

2016-08-26 Thread Martin Kreuzer
Hi all - Sharing something I observed ... While the definitions (for arithmetic and geometric mean) amean=: +/ % # and gmean=: */ %:~ # are nice to look at as a pair (because of symmetry) I prefer this definition of geometric mean gmean=: [: */ # %: ] or NB. using the Log domain