Re: [eigen] beta1: Nullary tests failing

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2010/6/30 Carlos Becker <carlosbecker@xxxxxxxxx>:
> Benoit & Gael: tests for nullary are failing, now at
> Test testVectorType(VectorXf(51)) failed in
> "/home/cjb/eigenThings/eigenBetaTest/eigen/test/nullary.cpp" (91)
>     (row_vector-col_vector.transpose()).norm() <
> NumTraits<Scalar>::epsilon()
> and also with other tests with float. I just added:
>    std::cout << "NumTraits<Scalar>::epsilon() => " <<
> NumTraits<Scalar>::epsilon() << std::endl;
>   std::cout << "Value => " << (row_vector-col_vector.transpose()).norm() <<
> std::endl;
> and got:
> NumTraits<Scalar>::epsilon() => 1.19209e-07
> Value => 5.33717e-05
> or
> NumTraits<Scalar>::epsilon() => 1.19209e-07
> Value => 4.26496e-06
> So I guess that it is the same we were fixing the other day but in a
> different place. If I change NumTraits<Scalar>::epsilon()
> by std::numeric_limits<Scalar>::epsilon()*10e3 then it runs ok (this would
> be Gael's fix).

Where would this 1e+3 come from? Let's avoid arbitrary magic numbers.
Also, use NumTraits<Scalar>::epsilon() and not
std::numeric_limits<Scalar>::epsilon(), although they are the same
when both are defined.

This test looks good, I am not sure why it is failing. One explanation
would be if one path was vectorized and not the other. Pinging Hauke
(you wrote LinSpaced didn't you?)

Benoit



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/