Re: Why no mod function?

"Alasdair McAndrew" <[email protected]>
Newsgroups gmane.comp.mathematics.axiom.user
Message-ID <[email protected]>
There's no difference between "mod" and positiveRemainder; in fact if it
were possible to rename positiveRemainder to mod then I'd be quite happy.
My reason for resorting to lisp was to create a function as simple as
possible, and also as much as possible like the functions already in si.spad.
My hope was just to "drop" a definition of mod into this file and, err, have
it all work.  I could have used

x mod y == x::ZMOD(y)

or

x mod y == (x::ZMOD(y))::INT

But, let's face it, "mod" is a stock-standard function; pretty much every
mathematical system has it, so why not Axiom?

cheers,
Alasdair

On 08 Aug 2007 01:18:48 +0200, Martin Rubey <[email protected]>
wrote:
>
> Dear Alasdair,
>
> apart from the technical issue of applying this patch to your local tree,
> I'd
> like to advise you not to resort to lisp for this particular purpose.  Try
> to
> stick to SPAD.  This will make it easier to reuse and debug your code.
>
> In fact, reading
>
> > x mod y == integer MOD(x,y)$Lisp
>
> I do not really see what mod does exactly.  Since SPAD was made for
> expressing
> maths, it should be easy to rewrite it in SPAD.
>
> By the way, what's the difference to positiveRemainder?
>
> Martin
>
>

_______________________________________________
Axiom-mail mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-mail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.