This page contains the description of the following commands quomod, quote,
The function (quomod a b) computes then the quotient q and remainder r are computed such that a=bq+r. The remainder is in #:ex:mod, and the quotient is returned. The function (remainder a b) computes the same quantities but returns the remainder. You can divide a polynomial by polynomial by a polynomial. In this case, the degree of r is less than the degree of b. Otherwise, the quotient is an integer, r is non-negative, less than the absolute value of b.
[Endymion] (quomod 100 7) 14 [Endymion] #:ex:mod 2 [Endymion] (remainder 100 7) 2 [Endymion] (quomod 100 -7) -14 [Endymion] (quomod 1/7 1/100) 14 [Endymion] #:ex:mod 1/350 [Endymion] #(quomod 1.2 7) #quomod : Cannot compute : (1.2 7) [Endymion] #(quomod 100 7.5) #quomod : Cannot compute : (100 7.5) [Endymion] (quomod #PD_s x^7+1; #PD_s x^2-1;) #PD_s 1*z + 1*z^3 + 1*z^5; [Endymion] #:ex:mod #PD_s 1 + 1*z;
The quote special form takes one argument. The evaluation is the argument. Instead of (quote foo) or (quote (foo bar)), you can say 'foo or '(foo bar): these expressions are read in the same way. Moreover the printer uses this short hand notation.
[Endymion] (list 'quote 1 2 3) (quote 1 2 3) [Endymion] (list 'quote 1) '1 [Endymion] (list 'quote 'foo) 'foo [Endymion] (eval (list 'quote 'foo)) foo [Endymion] (eval (list 'quote 'foo 'bar)) quote : wrong number of arguments : 2 this should be 1 [Endymion] (list (quote quote) (quote foo)) 'foo
back to home page © INRIA 2005, 2006 Last modified $Date: 2008/09/04 08:48:33 $