title: Why is anyValue % 1 "silly math" in Sonar when anyValue is a double?
body: <p>SonarQube raises the major violation <a href="https://dev.eclipse.org/sonar/coding_rules#q=silly%20math">Silly math should not be performed</a> in my code. The description says</p>
  
  <blockquote>
    <p>Certain math operations are just silly and should not be performed
    because their results are predictable.</p>
    
    <p>In particular, <code>anyValue</code> % 1 is silly because it will always return 0.</p>
  </blockquote>
  
  <p>In my case though, <code>anyValue</code> is a double. And this works <a href="http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.17.3">as intended</a> for me. Here's the actual code:</p>
  
  <pre><code>double v = Double.parseDouble(Utils.formatDouble(Double.valueOf(value.getValue()), accuracy.intValue()));
  boolean negative = v &lt; 0;
  v = Math.abs(v);
  long deg = (long) Math.floor(v);
  
  v = (v % 1) * 60;
  </code></pre>
  
  <p>Is the analyser assuming my variable is an <code>int</code> (which is their bug)? Or am I missing something else?</p>