As already described in this thread, you need to do: 16807x (2147483647x&|@^) 2147483646x 1 16807 (2147483647&|@^) 2147483646 1
The reason why the mathematically equivalent 2147483647|16807^2147483646 |NaN error | 2147483647 |16807^2147483646 doesn't work is that with this the system FIRST computes 16807^2147483646 , getting infinity, whence 2147483647|blah generates NaN. a m&|@^ b allows computation of things that you'd never be able to do with m|a^b . For example, what are the last 6 decimal digits of 2^10^100 ? This number has 10^100 bits, larger than the number of particles in the universe, so you can not first compute 2^10^100 and then find its residue mod 1e6. Instead: 2 (1e6&|@^) 10^100x 109376 ----- Original Message ----- From: bill lam <[email protected]> Date: Friday, April 10, 2009 1:43 Subject: [Jchat] 2147483647|16807^2147483646 To: JChat <[email protected]> > In At play with J 8.3, the author said > "2147483647|16807^2147483646 is > equal 1". When I tried to verify it, > 2147483647|16807^2147483646 > |NaN error > | 2147483647 |16807^2147483646 > 2147483647|16807^2147483646x > |limit error > | 2147483647|16807 ^2147483646 > > Did the author just prove it instead of try it? Or that can only be > run in APL\360? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
