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
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 %:
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
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