[ 
https://issues.apache.org/jira/browse/MAHOUT-600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988683#comment-12988683
 ] 

Dawid Weiss commented on MAHOUT-600:
------------------------------------

For what it's worth, we used to have these kinds of problems in Carrot2. 
Epsilon wasn't a solution for us since the assertions were on aggregated 
results of many computations. We finally executed tests in JVM's interpreted 
mode which seems to provide consistent results on various architectures (but it 
is painfully slow for longer computations).

> Reported test failure due to exact floating point comparison
> ------------------------------------------------------------
>
>                 Key: MAHOUT-600
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-600
>             Project: Mahout
>          Issue Type: Bug
>            Reporter: Ted Dunning
>             Fix For: 0.5
>
>         Attachments: 
> 0001-MAHOUT-600-Improves-floating-point-comparison-in-log.patch
>
>
> Jeremy Lewi kindly pointed this result from his machine out to us:
> {code}
> Test set: org.apache.mahout.math.VectorTest
> -------------------------------------------------------------------------------
> Tests run: 20, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.045 sec 
> <<< FAILURE!
> testLogNormalize(org.apache.mahout.math.VectorTest)  Time elapsed: 0.002 sec  
> <<< FAILURE!
> java.lang.AssertionError: 
> expected:<{2:0.5345224838248488,1:0.4235990463273581,0:0.2672612419124244}> 
> but was:<{2:0.5345224838248488,1:0.423599046327358,0:0.2672612419124244}>
>       at org.junit.Assert.fail(Assert.java:91)
>       at org.junit.Assert.failNotEquals(Assert.java:645)
>       at org.junit.Assert.assertEquals(Assert.java:126)
>       at org.junit.Assert.assertEquals(Assert.java:145)
>       at 
> org.apache.mahout.math.VectorTest.testLogNormalize(VectorTest.java:509)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> {code}
> I have a patch that cleans this up.  Will attach forthwith.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to