Re: Why no mod function?
"Bill Page" <[email protected]>
| Newsgroups | gmane.comp.mathematics.axiom.user |
|---|---|
| Message-ID | <[email protected]> |
On 7/10/07, Alasdair McAndrew wrote:
> Yes, that's pretty much what I did. But surely such an important function
> as mod should be available without having to write it yourself?
> ...
Digging a little deeper I found in the domain 'Integer':
(1) -> positiveRemainder(-13,10)
(1) 7
Type: PositiveInteger
I presume this is what you were looking for?
Also take a look at
(2) -> addmod(13,1,10)
(2) 4
Type: PositiveInteger
(3) -> submod(13,1,10)
(3) 12
Type: PositiveInteger
(4) -> mulmod(13,2,10)
(4) 6
Type: PositiveInteger
Regards,
Bill Page.