|[eigen] again a unit test precision question|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: Eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] again a unit test precision question
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Sat, 3 Jul 2010 12:46:28 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=2PtU+VxtPZBQR3z5e0t3TFmqwOz+7hZa0YOlPsszXfg=; b=cJKxveYxRfK8ITfawOrw+WyfUtHxCrOateiJ0LLmkRpisEKJGqX7JUquPsMiByCuQo OPM0NHI1M8AwVFrZH+wcsFqkJ+5O/77ahJZhamdwMRwdgYMp34c5HcM1XAh+AXLp7dQW vKoJ15HHw8gD/B7aVG4t7qWIxexGhw2yOPDB4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=oxRYTyr1875QBJoNtytStFr7jpZWg5YzFHcMz2T2qFxCxCTG/sd8twGsZIL3gCZgbd MqqoTJ2MwIvCPXbObOGoq9hbdDw2QaWl/gNonkZ0e/V62DPZVP+px0J9h0b90tCvAccQ K8IDslHDfcSATN4dfguIsjI1Gq1Nqv/xCCxNk=
Ok, we all know that this is slightly difficult - or maybe it is just
me. But probably not because sometimes it feels as if we are fixing
more unit tests than actual Eigen code. ;)
Anyways, the redux_8 test is failing every now and then in redux.cpp
line 105 (e.g. seed 1278148098).
The test is
and it is failing with values
6.1214e-005 and 6.10948e-005
and those values are probably occurring because v's values are uniform
random values from [-1,1]. I am quite bad in numerics but I assume we
are seeing such differences because of cancellation errors? Or is it
simply addition arithmetic?
Whatever it is, I think a trivial fix would be to compute the absolute
sum. It is not the same test but in order to succeed it requires both,
the sum and the absolute value to be working.
Do you consider this a good fix? Then I will apply it.