<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://code.msdn.microsoft.com/rss.xsl"?><rss version="2.0"><channel><title>MersenneTwister Work Item Rss Feed</title><link>http://code.msdn.microsoft.com/MersenneTwister/WorkItem/List.aspx</link><description>MersenneTwister Work Item Rss Description</description><item><title>CLOSED ISSUE: Broken Next()?</title><link>http://code.msdn.microsoft.com/MersenneTwister/WorkItem/View.aspx?WorkItemId=1</link><description>I ported the code to VB &amp;#40;used an automated tool followed by minor modifications&amp;#41;. As a sanity check I wrote a simple program to compute randoms for a few seconds, count distributions, and then dump to the console.&lt;br /&gt;&lt;br /&gt;I found that rand.Next&amp;#40;N&amp;#41; will always return half of the results that should be zero as N. This is an error, as Next&amp;#40;N&amp;#41; should always return a number less than N. &lt;br /&gt;&lt;br /&gt;For example, If I generate 30 randoms using rand.Next&amp;#40;3&amp;#41;, then I&amp;#39;ll get something like the following.&lt;br /&gt;0&amp;#61;5&lt;br /&gt;1&amp;#61;10&lt;br /&gt;2&amp;#61;10&lt;br /&gt;3&amp;#61;5&lt;br /&gt;&lt;br /&gt;It&amp;#39;s always possible that I messed something up in translation from C&amp;#35; to VB, but I couldn&amp;#39;t spot anything obvious.&lt;br /&gt;</description><author>codekaizen</author><pubDate>Sat, 26 Apr 2008 04:05:19 GMT</pubDate><guid isPermaLink="false">CLOSED ISSUE: Broken Next()? 20080426A</guid></item><item><title>COMMENTED ISSUE: Broken Next()?</title><link>http://code.msdn.microsoft.com/MersenneTwister/WorkItem/View.aspx?WorkItemId=1</link><description>I ported the code to VB &amp;#40;used an automated tool followed by minor modifications&amp;#41;. As a sanity check I wrote a simple program to compute randoms for a few seconds, count distributions, and then dump to the console.&lt;br /&gt;&lt;br /&gt;I found that rand.Next&amp;#40;N&amp;#41; will always return half of the results that should be zero as N. This is an error, as Next&amp;#40;N&amp;#41; should always return a number less than N. &lt;br /&gt;&lt;br /&gt;For example, If I generate 30 randoms using rand.Next&amp;#40;3&amp;#41;, then I&amp;#39;ll get something like the following.&lt;br /&gt;0&amp;#61;5&lt;br /&gt;1&amp;#61;10&lt;br /&gt;2&amp;#61;10&lt;br /&gt;3&amp;#61;5&lt;br /&gt;&lt;br /&gt;It&amp;#39;s always possible that I messed something up in translation from C&amp;#35; to VB, but I couldn&amp;#39;t spot anything obvious.&lt;br /&gt;Comments: Thanks for the translation&amp;#33;</description><author>codekaizen</author><pubDate>Fri, 18 Apr 2008 07:55:14 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: Broken Next()? 20080418A</guid></item><item><title>COMMENTED ISSUE: Broken Next()?</title><link>http://code.msdn.microsoft.com/MersenneTwister/WorkItem/View.aspx?WorkItemId=1</link><description>I ported the code to VB &amp;#40;used an automated tool followed by minor modifications&amp;#41;. As a sanity check I wrote a simple program to compute randoms for a few seconds, count distributions, and then dump to the console.&lt;br /&gt;&lt;br /&gt;I found that rand.Next&amp;#40;N&amp;#41; will always return half of the results that should be zero as N. This is an error, as Next&amp;#40;N&amp;#41; should always return a number less than N. &lt;br /&gt;&lt;br /&gt;For example, If I generate 30 randoms using rand.Next&amp;#40;3&amp;#41;, then I&amp;#39;ll get something like the following.&lt;br /&gt;0&amp;#61;5&lt;br /&gt;1&amp;#61;10&lt;br /&gt;2&amp;#61;10&lt;br /&gt;3&amp;#61;5&lt;br /&gt;&lt;br /&gt;It&amp;#39;s always possible that I messed something up in translation from C&amp;#35; to VB, but I couldn&amp;#39;t spot anything obvious.&lt;br /&gt;Comments: Well, my background threads finally caught up, and reminded me that VB always uses bankers rounding instead of truncation when converting from floating point to integer. &amp;#13;&amp;#10;Once I fixed the code, it works perfectly.&amp;#13;&amp;#10;Sorry for the confusion,&amp;#13;&amp;#10;j</description><author>JustinMichel</author><pubDate>Wed, 16 Apr 2008 17:50:13 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: Broken Next()? 20080416P</guid></item><item><title>CREATED ISSUE: Broken Next()?</title><link>http://code.msdn.microsoft.com/MersenneTwister/WorkItem/View.aspx?WorkItemId=1</link><description>I ported the code to VB &amp;#40;used an automated tool followed by minor modifications&amp;#41;. As a sanity check I wrote a simple program to compute randoms for a few seconds, count distributions, and then dump to the console.&lt;br /&gt;&lt;br /&gt;I found that rand.Next&amp;#40;N&amp;#41; will always return half of the results that should be zero as N. This is an error, as Next&amp;#40;N&amp;#41; should always return a number less than N. &lt;br /&gt;&lt;br /&gt;For example, If I generate 30 randoms using rand.Next&amp;#40;3&amp;#41;, then I&amp;#39;ll get something like the following.&lt;br /&gt;0&amp;#61;5&lt;br /&gt;1&amp;#61;10&lt;br /&gt;2&amp;#61;10&lt;br /&gt;3&amp;#61;5&lt;br /&gt;&lt;br /&gt;It&amp;#39;s always possible that I messed something up in translation from C&amp;#35; to VB, but I couldn&amp;#39;t spot anything obvious.&lt;br /&gt;</description><author>JustinMichel</author><pubDate>Mon, 14 Apr 2008 00:16:06 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: Broken Next()? 20080414A</guid></item></channel></rss>