This message illustrates a point about writing in the macsyma language.
If lower level code is to be written in macsyma, then we have to be careful
about chosing the primitives which would be implemented in lisp and make
sure it is possible to call routines in macsyma without error checking when
necessary.
Andrei Zorine wrote:
>I tried to write down Rabin-Miller primality test for Maxima. First I
>wrote it in the Maxima language. But since the algorithm demands
>computing powers modulo n, msetchk complains (WARNs, sorry :)) n is not
>prime, and moreover it calls primep on n first. (By the way, the fact
The FOR statement is a real problem in macsyma, as it often requires returning
two values, one to indicate that a additional branch is necessary, to perform
a goto out of multiple block levels.
>that FOR statement is a BLOCK-like statement with respect to RETURN, is
>mentioned only in the DO article in the middle, hard to notice; why not
>mention it in the RETURN article as well?). Finally I decided to rewrite
>it in plain lisp to get rid of all those general calls when maxima has
>to typecheck arguments...