Question: Problem with modulo

Question:Problem with modulo

mme 5 Maple

Version: Maple 7

How can I acheive the following?

Pseudo-maple, this is what I want to happen.
> f:=modp(x,2);
> subs(x=3, f);
(output) 1

The problem is that the first line echoes "f:=x" and then subs(x=3,f); outputs 3.

In a similar way, I get the following unexpected result,
> f2 := 0.5 < floor( modp(floor(y/17)* 2^(-17*floor(x)-modp(floor(y),17)) ,2) );
(output) f2 := .5 < 0

For some reason the RHS of the inequality reduces to 0 rather than being something symbolic into which I can substitute values at will.

Also, is there a function for modulo with floats/decimals?

Thanks

Please Wait...