Boost logo

Boost :

From: Gerhard Wesp (gwesp_at_[hidden])
Date: 2006-05-29 10:36:45


> So the unsigned_integer would have a static method
> void set_modulus( const integer & ).

I'd prefer not to have a program-global modulus. Remember that we're
also trying to put threading into TR2.

Alternatives:
- Optional modulus argument to certain functions. This seems to be the
  approach that Mathematica chooses.
- Maybe a reference to the modulus in the constructor.

[ Yes, I know that NTL uses the static modulus approach. Still, my gut
feeling tells me this is suboptimal. ]

BTW, it seems strange that modular arithmetic should restricted to
unsigned integers.

Regards
-Gerhard

-- 
Gerhard Wesp
ZRH office voice: +41 (0)44 668 1878
ZRH office fax: +41 (0)44 200 1818
For the rest I claim that raw pointers must be abolished.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk