title: why using int64_t gives wrong result while double works as expected for simple integer multiplications
body: <p>here is my code :</p>
  
  <pre><code>using integer = int64_t;
  
  integer factorial(integer number) {
      return number &lt;= 0 ? 1 : number * factorial(number - 1);
  }
  
  integer binomial_coefficent(integer n, integer r) {
      return factorial(n) / (factorial(r) * factorial(n - r));
  }
  
  int main()
  {
      using namespace std;
      cout &lt;&lt; binomial_coefficent(40, 20) &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>this prints</p>
  
  <pre><code>0
  </code></pre>
  
  <p>which is wrong answer but if i change integer type to double that will print <code>1.37847e+11</code>
  which is the correct answer,my question is why using int64_t gives me incorrect answer </p>