From: Ned Konz Date: 2001-08-04T14:28:29+09:00 Subject: [ruby-talk:19108] Re: Endianness and integer indexing On Friday 03 August 2001 10:08 pm, you wrote: > On Sat, 04 Aug 2001 03:40:12 GMT, Harry Ohlsen wrote: > >> For those wondering why I did this, here is a mod_exp routine > >> for calculating z**n % q for very large numbers such as are used > >> in public key encryption: > > > >Sorry, I can't answer your question, but thanks for the code. I was > >literally just about to write the same thing! > > Oh, okay. I've noticed an interesting thing about [] though -- it is > almost as slow as doing a " % 2" on the number! Wouldn't it be faster to just do '| 1' if all you're doing is testing evenness? -- Ned Konz currently: Stanwood, WA email: ned@bike-nomad.com homepage: http://bike-nomad.com