If you use the boxed (5!:2) or the tree (5!:4) or the paren (5!:6) displays
you can see how the functions are grouped (parenthesized).  You can also
use Edit|Configure|DisplayForm from the main menu to get these displays.

And yes, it does do the 100000&|@rtz between every multiplication, because
the grouping is
   (100000&| @ rtz @ *) / @: >: @ i.



On Tue, Nov 1, 2011 at 10:23 AM, David Vaughan <[email protected]
> wrote:

> I am trying to get the factorial of very large numbers, but I only care
> about the last 5 digits before the trailing zeros. So, I was hoping to do
> this:
>
> rtz =: %&10 ^: (0: = 10&|) ^:_                  NB. remove trailing zeros
> of y
> f =: 100000&| @ rtz @ */@:>:@i.         NB. get the last 5 non-zero digits
> of y
>
> Though I am not sure that it is doing exactly as I was hoping.
>
> My question is, does f do 100000&| @ rtz in between every multiplication
> or does it actually only apply itself at the end once?
>
> Thanks.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to