sawtooth function mathematica