• Welcome to Valhalla Legends Archive.
 

Arithmetic in Arrays

Started by shout, May 10, 2005, 11:22 AM

Previous topic - Next topic

shout

Anyone know how to perform modulus on arrays treated as a large integer? I am creating an SRP implementation and I do not want to impletment some large integer class for just modulus and pow.


Adron

Quote from: Shout on May 10, 2005, 11:22 AM
Anyone know how to perform modulus on arrays treated as a large integer? I am creating an SRP implementation and I do not want to impletment some large integer class for just modulus and pow.

What would be involved in implementing some large integer class apart from the basic things you need for modulus and pow? To multiply and divide numbers, you need to be able to compare, shift, add and subtract. Isn't that just what a basic large integer class supports?