primarydef x mod y = (x-y*floor(x/y)) enddef;