</p>
<p>Let's define a function to do this:</p>
<pre><code>decimalpart(x) = x - int(x);
</code></pre>
<p>We can now use this function to turn our ramp into a sawtooth. It is then tempting to write:</p>
<pre><code>process = 0.125 : + ~ _ : decimalpart;
</code></pre>
<p>From a mathematical point of view, that would be perfectly correct, but we will accumulate rounding errors. To keep total accuracy, it is better to place the operation of the decimal part inside the loop, like this:</p>
<pre><code>process = 0.