mod(x,1)



--- Fabrizio Caruso  wrote:

> Is it normal that "mod"
> gives an error message when the modulo is 1?

Well, mod(n, 1) should yield 0 for all n, I suppose.
I don't see a problem with that. It should be easy
to make a special case for modulus = 1.

> (1) making "op" behave as in MaCSYma, i.e.
> "op" should work on atoms

We can have op(a) => false for an atom a.
"false" isn't a legitimate operator.

By the way, I don't know how op behaves in Macsyma 
and you haven't explained, so I'm making a guess
about what a useful behavior might be.

> (2) For the same reason as above, "operatorp" should be
> operatorp(expr,operator) :=
>  if op(expr) = operator then
>    TRUE
>  else
>    FALSE;

I don't think we need to change operatorp, if op is changed.

For what it's worth,
Robert Dodier


		
__________________________________ 
Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html