<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>David R. MacIver - Latest Comments in Unsigned comparison in Java/Scala</title><link>http://drmaciver.disqus.com/</link><description></description><atom:link href="https://drmaciver.disqus.com/unsigned_comparison_in_javascala/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 05 Aug 2008 18:23:28 -0000</lastBuildDate><item><title>Re: Unsigned comparison in Java/Scala</title><link>http://www.drmaciver.com/2008/08/unsigned-comparison-in-javascala/#comment-6265725</link><description>&lt;p&gt;So it returns true if "i &amp;gt;= j"?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anon</dc:creator><pubDate>Tue, 05 Aug 2008 18:23:28 -0000</pubDate></item><item><title>Re: Unsigned comparison in Java/Scala</title><link>http://www.drmaciver.com/2008/08/unsigned-comparison-in-javascala/#comment-6265719</link><description>&lt;p&gt;(Oh dear. Less-than/greater-than munging obliterated the fully spelled-out version at the end of the previous comment.)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tony Garnock-Jones</dc:creator><pubDate>Mon, 04 Aug 2008 22:28:51 -0000</pubDate></item><item><title>Re: Unsigned comparison in Java/Scala</title><link>http://www.drmaciver.com/2008/08/unsigned-comparison-in-javascala/#comment-6265724</link><description>&lt;p&gt;Here's another way of reading it:&lt;/p&gt;&lt;p&gt;"(i &amp;lt; 0) ^ (j &amp;lt; 0)" reads as "i and j have different signs".&lt;/p&gt;&lt;p&gt;So the whole thing reads "i less than j, xor i and j have different signs", so&lt;/p&gt;&lt;p&gt; - either i  j, and i and j have differing signs&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tony Garnock-Jones</dc:creator><pubDate>Mon, 04 Aug 2008 22:27:59 -0000</pubDate></item><item><title>Re: Unsigned comparison in Java/Scala</title><link>http://www.drmaciver.com/2008/08/unsigned-comparison-in-javascala/#comment-6265723</link><description>&lt;p&gt;A truth table is just a way of laying out the answers. It doesn't omit the burden of actually proving each case, which is what I did there.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">david</dc:creator><pubDate>Mon, 04 Aug 2008 18:01:18 -0000</pubDate></item><item><title>Re: Unsigned comparison in Java/Scala</title><link>http://www.drmaciver.com/2008/08/unsigned-comparison-in-javascala/#comment-6265722</link><description>&lt;p&gt;&amp;gt; (there’s probably a nicer way to see that it works, but I’m blanking on what it is)&lt;/p&gt;&lt;p&gt;A truth table?&lt;/p&gt;&lt;p&gt;Rich&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rich Dougherty</dc:creator><pubDate>Mon, 04 Aug 2008 17:55:43 -0000</pubDate></item><item><title>Re: Unsigned comparison in Java/Scala</title><link>http://www.drmaciver.com/2008/08/unsigned-comparison-in-javascala/#comment-6265721</link><description>&lt;p&gt;Of course it does. But this doesn't use a ternary operator.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">david</dc:creator><pubDate>Mon, 04 Aug 2008 14:00:19 -0000</pubDate></item><item><title>Re: Unsigned comparison in Java/Scala</title><link>http://www.drmaciver.com/2008/08/unsigned-comparison-in-javascala/#comment-6265720</link><description>&lt;p&gt;actually the ternary operator DOES result in a branch, it's ust not based on an "IF" in the language, but for the compile/JVM, it's same.   No matter, this is still an elegant solution.  I HATE C/C++, but times like this particular one make me think "macro."  Still I'll take java anyday over C/C++&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">chris</dc:creator><pubDate>Mon, 04 Aug 2008 13:57:09 -0000</pubDate></item></channel></rss>