<div dir="ltr">On Thu, Mar 28, 2013 at 12:57 PM, Renato Golin <span dir="ltr"><<a href="mailto:rengolin@systemcall.org" target="_blank">rengolin@systemcall.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 28 March 2013 19:36, Daniel Dunbar <<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>> wrote:<br>

> I don't understand this comment.<br>
<br>
</div>I thought you meant change the input to something that would be<br>
stable, ignore me.<br>
<div class="im"><br>
<br>
> I just meant transforming the call to qsort<br>
> so the sort would be stable, regardless of the actual sort implantation, by<br>
> augmenting the comparator function with the index of the element in the<br>
> incoming array (to disambiguate equality). See also<br>
> <a href="http://en.wikipedia.org/wiki/Schwartzian_transform" target="_blank">http://en.wikipedia.org/wiki/Schwartzian_transform</a><br>
<br>
</div>I did that, and made no difference. Either because the current order<br>
is just right (and the old wrong, but I can't test it), or because it<br>
was never hit and the stability of the sort wasn't the one to blame,<br>
but the order in the indexed array.<br></blockquote><div><br></div><div style>My guess is because the old one is "wrong". I tried switching the code to use mergesort (which is stable on OS X) and the output no longer matches the current reference output. Feel free to check in the change to the code to make it stable and the new reference output file, and if it happens to not work on OS X I can investigate.</div>
<div style><br></div><div style> - Daniel</div><div style><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Since those cases were also happening on Intel, I haven't spent that<br>
much time on those and left them for later...<br>
<div class="im"><br>
<br>
> If I get some time to look at this I'll just find a Linux environment to use<br>
> to investigate, which should cover all the issues except for the sqlite3<br>
> one.<br>
<br>
</div>That's ok, I hope the sqlite3 issue can be solved with the round() function.<br>
<br>
I'll update you on my progress, so that we don't work on the same<br>
thing at the same time.<br>
<br>
cheers,<br>
--renato<br>
<br>
PS: the fpcmp bug: <a href="http://llvm.org/bugs/show_bug.cgi?id=15620" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=15620</a><br>
<br>
It's possible that sqlite3 can be fixed *only* by fixing that... I'll wait<br>
</blockquote></div><br></div></div>