title: Unsigned long long arithmetic into double
body: <p>I'm making a function that takes in 3 unsigned long longs, and applies the law of cosines to find out if the triangle is obtuse, acute or a right triangle. Should I just cast the variables to doubles before I use them?</p>
  
  <pre><code>void triar( unsigned long long&amp; r, 
              unsigned long long x, 
              unsigned long long y, 
              unsigned long long z ) 
  {
    if(x==0 || y==0 || z==0) die("invalid triangle sides");
  
    double t=(x*x + y*y -z*z)/(2*x*y);
  
    t=acos (t) * (180.0 / 3.14159265);
  
    if(t &gt; 90) {
      cout&lt;&lt;"Obtuse Triangle"&lt;&lt;endl;
      r=t;
  
    } else if(t &lt; 90){
      cout&lt;&lt;"Acute Triangle"&lt;&lt;endl;
      r=t;
  
    } else if(t == 90){
      cout&lt;&lt;"Right Traingle"&lt;&lt;endl;
      r=t;
  
    }
  }
  </code></pre>