The sawtooth wave, called the "castle rim function" by Trott (2004, p. 228), is the periodic function given by

(1)

where
is the fractional part , is the amplitude, is the period of the wave, and is its phase. (Note that Trott 2004, p. 228 uses the
term "sawtooth function" to describe a triangle
wave.) It therefore consists of an infinite sequence of truncated ramp
functions concatenated together.