<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,9 +33,12 @@
 -import(random).
 
 v4() -&gt;
-    v4(random:uniform(math:pow(2, 48)) - 1, random:uniform(math:pow(2, 12)) - 1, random:uniform(math:pow(2, 32)) - 1, random:uniform(math:pow(2, 30)) - 1).
-v4(R1, R2, R3, R4) -&gt;
+    R1 = random:uniform(round(math:pow(2, 48))) - 1,
+    R2 = random:uniform(round(math:pow(2, 12))) - 1,
+    R3 = random:uniform(round(math:pow(2, 32))) - 1,
+    R4 = random:uniform(round(math:pow(2, 30))) - 1,
     &lt;&lt;R1:48, 4:4, R2:12, 2:2, R3:32, R4: 30&gt;&gt;.
+
 to_string(U) -&gt;
     lists:flatten(io_lib:format(&quot;~8.16.0b-~4.16.0b-~4.16.0b-~2.16.0b~2.16.0b-~12.16.0b&quot;, get_parts(U))).
 </diff>
      <filename>uuid.erl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8f39b27ea0958e4a86136d2f0b70074bf9b1c27a</id>
    </parent>
  </parents>
  <author>
    <name>wildchild</name>
    <email>alexander.uvarov@gmail.com</email>
  </author>
  <url>http://github.com/wildchild/erlang-uuid/commit/1df563281bde3ccd0f10d420e1e615f5e3669899</url>
  <id>1df563281bde3ccd0f10d420e1e615f5e3669899</id>
  <committed-date>2009-09-19T09:42:46-07:00</committed-date>
  <authored-date>2009-09-19T09:42:46-07:00</authored-date>
  <message>Round value before passing it to random number generator</message>
  <tree>aadb9937ed9d894d49ccc70a4ca575c69bd9cba3</tree>
  <committer>
    <name>wildchild</name>
    <email>alexander.uvarov@gmail.com</email>
  </committer>
</commit>
