Yes: 5^441 442 1.76105e308 _
Thanks, -- Raul On Fri, Aug 26, 2016 at 5:38 PM, Brian Schott <[email protected]> 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 values seems to be the issue because for samples of 441 and > less the failure is not present, but is present for 442 and greater. > > Does this example suggest any more general pattern to other folks? > > > (gm0,gm1,gm2) 442#5 > _ 5 5 > (gm0,gm1,gm2) 441#5 > 5 5 5 > > On Fri, Aug 26, 2016 at 7:38 AM, Martin Kreuzer <[email protected]> wrote: > >> 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 >> gmean=: [: ^ [: amean ^. >> >> because, given these (intermediate) definitions >> >> NB. often found >> gm0=. */ %:~ # >> NB. taking the roots first, then multiply >> gm1=. [: */ # %: ] >> NB. definition found on (&.:) page of NuVoc >> gm2=. amean &.: ^. >> >> I got these results (see gm0 failing while the other two hold) >> >> (gm0,gm1,gm2) >: ? 6 $~ 637 >> 3.04409 3.04409 3.04409 >> (gm0,gm1,gm2) >: ? 6 $~ 638 >> _ 3.05264 3.05264 >> (gm0,gm1,gm2) >: ? 6 $~ 2^24 >> _ 2.99357 2.99357 >> >> under J v8.04 on a 32-bit Vista machine. >> >> Thanks >> -M >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > > > > > -- > (B=) <-----my sig > Brian Schott > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
