Well, you can do this:

   (3 :'({.y)&|@^/ }.y')"1 ]10 14 22,.5 7 11,.400 4000 40000
5 7 11

I don't think there's anything that uses rank reasonably.

Marshall

On Thu, May 3, 2012 at 3:32 PM, Joe Groff <arc...@gmail.com> wrote:

> Hi everyone. Verbs formed by (m&|@^) are implemented by modular
> exponentiation:
>
> ---
>   5 (10&|@^) 40000
> 5
>   7 (14&|@^) 40000
> 7
>   11 (22&|@^) 40000
> 22
> ---
>
> However, it appears that (m1,m2,...)&|@:^ doesn't get the same
> treatment and falls back to power-then-residue, causing it to blow up
> for large exponents:
>
> ---
>    5 7 11 (10 14 22&|@:^) 400 4000 40000
> |NaN error
> |   5 7 11    (10 14 22&|@:^)400 4000 40000
> ---
>
> Is it possible to get the equivalent of (m1,m2,...)&|@:^ using the
> special code for atomic m&|@^ ?
>
> -Joe
> ----------------------------------------------------------------------
> 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