title: Remainder rem() and mod() not working properly
body: <p>I am stuck in finding checking whether a variable has value equal to an integer not. The given are the MALAB commands. The variable <code>cc</code> has value <code>1.0000</code> and I am checking whether its remainder is zero or not. it should be zero but it gives <code>1</code>. Why doesn't this give <code>0</code>?</p>
  
  <pre><code>&gt;&gt; cc
  cc =
      1.0000
  &gt;&gt; rem(cc,1)
  ans =
      1.0000
  &gt;&gt; rem(1.0000,1)
  ans =
       0
  &gt;&gt; mod(1.0000,1)
  ans =
       0
  &gt;&gt; mod(cc,1)
  ans =
      1.0000
  &gt;&gt; mod(1.0000,1)
  mod(cc,1)
  </code></pre>