Hi Nicolas,<div><br></div><div>    I need to check these carefully.  One thing that does differ in current Cog is that the machine-code arithmetic float primitives don&#39;t fail if they produce a NaN result; they simply answer a NaN result.  IMo what needs to be done is two-fold.</div>
<div><br></div><div>a) we need a NaN mode flag in the VM, that persists across snapshots and e.g. is queryable/settable via vmParameterAt:put:, that puts the floating-pont primitive into a state where NaNs are answered instead of primitives failing.</div>
<div><br></div><div>b) the Cog code generator needs to respect this flag and arrange that when in the default mode (current behavior) the machine-code arithmetic float primitives also fail if they produce a NaN result.<br>
<br></div><div>We can then decide at a later date whether to change the primitive behavior to answer NaNs or not.  This is also what we did in VisualWorks; there&#39;s an IEEE arithmetic mode and in recent releases VW&#39;s floating-point arithmetic will produce NaNs.</div>
<div><br></div><div>Anyone interested in taking a look at this is very welcome.  Its probably a week long project at most.</div><div><br></div><div>best,</div><div>Eliot</div><div><br><div class="gmail_quote">On Thu, Sep 16, 2010 at 12:19 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
I mean the M7260-primitiveSmallIntegerCompareNan-Patch-nice.1.cs part,<br>
the rest has already been applied in COG.<br>
<br>
Nicolas<br>
<br>
2010/9/16 Nicolas Cellier &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; I see <a href="http://bugs.squeak.org/view.php?id=7260" target="_blank">http://bugs.squeak.org/view.php?id=7260</a> was not integrated in<br>
&gt; COG, which was the cause of most of the Floating point failures in old<br>
&gt; VM, but maybe it&#39;s now more complex than that ?<br>
&gt;<br>
&gt; Nicolas<br>
&gt;<br>
&gt; 2010/9/16 Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt; Hi Eliot. I took a Pharo 1.1.1 image (which has included the changes to run Cog) and I run all the tests with the build  r2219<br>
&gt;&gt;<br>
&gt;&gt; And these are the results:<br>
&gt;&gt;<br>
&gt;&gt; 9768 run, 9698 passes, 53 expected failures, 15 failures, 2 errors, 0 unexpected passes<br>
&gt;&gt; Failures:<br>
&gt;&gt; FloatTest&gt;&gt;#testRaisedTo<br>
&gt;&gt; MCInitializationTest&gt;&gt;#testWorkingCopy<br>
&gt;&gt; FloatTest&gt;&gt;#testReciprocal<br>
&gt;&gt; ReleaseTest&gt;&gt;#testUndeclared<br>
&gt;&gt; FloatTest&gt;&gt;#testDivide<br>
&gt;&gt; MethodContextTest&gt;&gt;#testClosureRestart<br>
&gt;&gt; FloatTest&gt;&gt;#testCloseTo<br>
&gt;&gt; FloatTest&gt;&gt;#testHugeIntegerCloseTo<br>
&gt;&gt; FloatTest&gt;&gt;#testInfinityCloseTo<br>
&gt;&gt; WeakRegistryTest&gt;&gt;#testFinalization<br>
&gt;&gt; PCCByLiteralsTest&gt;&gt;#testSwitchPrimCallOffOn<br>
&gt;&gt; AllocationTest&gt;&gt;#testOneGigAllocation<br>
&gt;&gt; FloatTest&gt;&gt;#testNaNCompare<br>
&gt;&gt; FileStreamTest&gt;&gt;#testPositionPastEndIsAtEnd<br>
&gt;&gt; NumberTest&gt;&gt;#testRaisedToIntegerWithFloats<br>
&gt;&gt;<br>
&gt;&gt; Errors:<br>
&gt;&gt; MessageTallyTest&gt;&gt;#testSampling1<br>
&gt;&gt; WeakSetInspectorTest&gt;&gt;#testSymbolTableM6812<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I think that most of these problems were fixed in latest official SqueakVM. I guess they were integrated in VMMaker in versions later than the one you used for Cog. Maybe you can integrate them and create a new version?<br>

&gt;&gt;<br>
&gt;&gt; I am not a VM expert so please if you can help us with this tests it would be cool.<br>
&gt;&gt;<br>
&gt;&gt; Thanks<br>
&gt;&gt;<br>
&gt;&gt; Mariano<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>