home *** CD-ROM | disk | FTP | other *** search
- # mod(x,y) gives the remainder on the divison of x by y.
- # See also: div.
- # e.g. mod(7,2) gives 1, mod(7/3,2) gives 1/3, mod(5.5,2) gives 1.5
-
- mod(x_,y_) := if(isratio(x),
- mod(div(nume(x),deno(x)),y)+mod(nume(x),deno(x))/deno(x))
- mod(x1_,y1_) := if(not(isinteger(x1)), mod(trunc(x1),y1)+frac(x1))
-