title: Trouble calculating MD5 integer part of the sines
body: <p>I was playing with an MD5 implementation and coded up the following for the binary part of the sines of integers, using the pseudocode found on wikipedia. I've found discrepancies between my output and the precomputed table widely available. </p>
  
  <p>I'm trying to figure out if my code is incorrect or the pseudocode on Wikipedia is incorrect.  Replacing <code>math.Floor</code> with <code>math.Ceil</code> in the code below fixes the discrepancies between the precomputed table and my output. </p>
  
  <pre><code>package main
  
  import "fmt"
  import "math"
  
  func main() {
          var i float64
          for i &lt; 64 {
                  x := uint(math.Floor(float64(math.MaxUint32) * math.Abs(math.Sin(i+1))))
                  fmt.Printf("%d : %x\n", uint(i+1), x)
                  i = i + 1
          }
  }
  </code></pre>
  
  <pre><code>1 : d76aa477
  2 : e8c7b755
  3 : 242070db
  4 : c1bdceee
  </code></pre>
  
  <p>Lines 1 and 2 different from the precomputed table, while line 3 is in agreement. </p>