From: Maarten Kronenburg (M.Kronenburg_at_[hidden])
Date: 2006-05-29 17:26:48
What do you mean with "modulus version"?
When the modulus is a constructor
argument, then I suppose each object
can have its own modulus.
Then it is not clear to me how arithmetic
between different objects with different
moduli should be done.
"Sebastian Redl" <sebastian.redl_at_[hidden]> wrote in message
> Maarten Kronenburg wrote:
> >In my opinion the unsigned integer with a modulus
> >is required, which is generalizing the base type
> >unsigned int (which is modular) to any modulus.
> >So the unsigned_integer would have a static method
> >void set_modulus( const integer & ).
> >The only problem is what an unsigned_integer is
> >when a modulus is not providid, that is when
> >the modulus is zero.
> >Then I propose that as the user did not provide
> >any modulus, only in this case negating a non-zero
> >unsigned_integer will be an error.
> >Also I propose that such an unsigned_integer will be
> >provided by implementations, and be added
> >to the specification.
> Or you drop unsigned_integer completely (David convinced me that it is
> not really needed) and only have a modulus version, which takes the
> modulus as a constructor argument. Then negation is always defined.
> Sebastian Redl
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk