is remainder(x,y) really x-((round(x/y)*y)?
<p>Reading the answer of <a href="https://stackoverflow.com/users/3959454/anton-savin">@anton</a> in this <a href="https://stackoverflow.com/questions/26519082/why-am-i-getting-a-different-result-from-stdfmod-and-stdremainder">link</a> I tried to see if really <code>remainder(x, y)</code> is exactly <code>x-(round(x/y)*y)</code>.</p>

<p>Running the code for the value of <code>x=5.</code> and <code>y=2.</code>. I got: </p>

<pre><code>printf("the value of remainder is %f\n",remainder(x, y));
printf("the value of remainder is %f\n",x-(round(x/y)*y));
</code></pre>

<blockquote>
  <p>the value of remainder is 1.000000</p>
  
  <p>the value of remainder is -1.000000</p>
</blockquote>

<p>From <a href="https://en.wikipedia.org/wiki/IEEE_754-1985" rel="nofollow noreferrer">wikipedia</a> :</p>

<blockquote>
  <p>Floating point <strong>remainder</strong>. This is not like a normal modulo operation,
  it can be negative for two positive numbers. It <strong>returns the exact</strong>
  <strong>value of x–(round(x/y)·y)</strong>.</p>
</blockquote>

<p>Is the explanation of Anton wrong, or am I missing something ?</p>