[Insight-developers] vnl_test_math failing in several platforms

Hans Johnson hans-johnson at psychiatry.uiowa.edu
Fri Feb 4 11:07:59 EST 2005


Luis,

I looked at this some time ago, but did not come up with a full
solution. The problem seems to be that the test is very sensitive to
exactly how floating point values are handeled. It seems to be hardcoded
assuming a particular floating point representation used by default on
intel compilers (i.e. 80 bits of precision for round off errors). It is
very sensitive to how floating point optimization and round off occurs.

I think this test needs different initializations for each of the
following cases:
1) gcc compiler when -ffloat-store
2) icc compiler when -pc64 is used
3) gcc on an Alpha processor

I hope this cryptic message helps.  

Hans


On Feb 04, 2005 09:45 AM, Luis Ibanez <luis.ibanez at kitware.com> wrote:

> 
> The test vnl_test_math is failing in several platforms
> 
>
> http://www.itk.org/Testing/Dashboard/20050204-0500-Nightly/TestDetail/__Utilities_vxl_core_vnl_tests_vnl_test_math.html
> 
> the problem seems to be related to the use of the type
> 
>                    "long double"
> 
> 
> The relevant lines are:
> 
>      Insight/Utilities/vxl/core/vnl/tests/test_math.cxx
> 
> 
> line 98:
> long double qnan_q = vcl_numeric_limits<long double>::quiet_NaN();
> 
> line 143:
> testlib_test_assert("!isfinite(qnan_q)", !vnl_math_isfinite(qnan_q));
> 
> We already have the following comment in this file, regarding the
> isnan
> test for the same type "long double"
> 
> 
>    /* This test fails on some platforms, but ITK does not need it.
> If it is ever fixed in vnl proper, we will include the fix here. */
> /*testlib_test_assert(" isnan(qnan_q) ", vnl_math_isnan(qnan_q));*/
> 
> 
> 
> 
> Does anybody see a problem with commenting out the 'isfinite' test too
> ?
> 
> 
> Does anybody care about "long double"  ?
> 
> 
> 
> 
>      Luis
> 
> 
> 
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
> 



Hans Johnson
hans-johnson at uiowa.edu



More information about the Insight-developers mailing list