axiom-mail
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-mail] Why no mod function?


From: Alasdair McAndrew
Subject: [Axiom-mail] Why no mod function?
Date: Tue, 10 Jul 2007 09:16:05 +1000

Why is there no modulus function in Axiom?  Such as

-13 mod 10 producing 7.

There's rem, but if you want a positive value you have to tweak the result.  I can get x mod n with (x::ZMOD n)::INT but that's a bit of a kludge, and if I put it in a program the compiler doesn't like it.

Thanks,
Alasdair

reply via email to

[Prev in Thread] Current Thread [Next in Thread]