title: Constant truncated to integer
body: <p>The following GO program gives the error:</p>
  
  <pre><code>./fft.go:13: constant -6.28319 truncated to integer
  ./fft.go:13: cannot use -7 * k / N (type int) as type float64 in assignment
  </code></pre>
  
  <p>Program:</p>
  
  <pre><code>package main
  
  import (
      "math"
      "fmt"
  )
  
  func main() {
      fmt.Println("Hello world ",math.E)
  
      var k, N int = 1, 10
      var ans float64 = 0
      var c float64 = (-2.0 * math.Pi * k) / N
      x := make([]float64,N)
      for i := 0; i &lt; len(x); i++ {
          x[i] = 1
      }
      ans = 0
      for i := 0; i &lt; N; i++ {
          ans += x[i] * math.E
      }
      fmt.Println(ans)
  }
  </code></pre>
  
  <p>Why cant I use an <code>int</code> in a type of <code>float64</code> ?</p>