algorithms tend to do things like change the modulus of
a number from time to time. Hensel lifting and the
Chinese Remainder Algorithm do this. If you treat numbers
as having an immutable modulus, this becomes clumsy.
On the other hand, modulus tags may keep the system from
doing absurd things unintentionally.
I think that TeX has two different "mod" tokens, both look
the same ... letters m o d ... but with different spacing,
maybe for 3 mod 13 vs. a=b mod 13.
I can't find the Maple numerics paper online, but I'll keep
looking. Among the authors, Dave Hare.
Google also found some items on arithmetic in Haskell.
Stavros Macrakis wrote:
>>do you want modular numbers to carry their modulus along
>>with them? (there are argument pro and con)
>>
>>
>
>I'm not sure I follow you here. If they don't carry their modulus along
>with them, in what sense are they different from integers? It may well
>be that modular numbers with modulus are not terribly useful -- but the
>design should be such that if they are, they can be handled, as can
>those without.
>
>
>
>>Tagging floats (in addition to the tag they already have
>>in CL) is going to cost in time and space.
>>
>>
>
>Thanks for picking up on this. I did write that all gennums would be
>tagged, but in fact I expect that those which are native CL types would
>not be tagged additionally, something like the current situation with
>float and bigfloat. I do not have a complete design, though. Note that
>bigfloats don't work everywhere they should, either (there is no
>keepbigfloat for CRE representation -- bug 661193; random functions fail
>with bigfloats -- bug 652470). I suspect that gennum-integers (e.g.
>modular) will not really work that well, but I also suspect that they're
>not that useful.
>
>I'd like to look at the Maple design. Can you point me at the
>particular documents that you think are relevant?
>
> -s
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>
>