function ret = tand(x, y) if x == -1 ret = -1; elseif x == 0 ret = 0; else ret = y; end