Re: [eigen] Changed behavior of jacobisvd |

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

*To*: eigen <eigen@xxxxxxxxxxxxxxxxxxx>*Subject*: Re: [eigen] Changed behavior of jacobisvd*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Fri, 5 Jun 2015 10:52:23 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=PZ1DMeb8nCOO8VbcYJD8eQbhM5R+bTy1OjamGJREhP0=; b=js8DaeuKY2z277pLi+2qv5FLR8nZEMd90W0MzTth+l4dMsMvNKxX2uqpZH0ZPFXbcy cPNS2hZzZNP3SYbk1xFGIAemX7kqFzezB564EJ2axsm8LUW57VUcUJzFSEIT11bbI7GP PY+dWV1zn6GsIRBUEmFp8JnbnimWe5D+6SIteLm1t1Kz+tcNB2mrVx6/R8FOwxDcBxxt IEHAzyepR3uVnbY5Le0gjZXRRb1Z263QhPI1RapIvL0ZnAD4YGneizDisjlZBkyJDGR1 C+UJONp4DfoBZ5Ed57xAmcbJRPn7MjGKmksxSIcOEqHmtY/SY8dmqVMnQJviRCG2Fy4u m8ug==

Hi,

no big deal as the third singular value is still numerically zero compared to the largest one, and I'm pretty sure that you can build examples exhibiting the opposite behavior. For the record, the precise changes at the origin of this change of behavior are in the computation of the 2x2 SVD:

old:

RealScalar u = d / t;

rot1..c() = RealScalar(1) / sqrt(RealScalar(1) + numext::abs2(u));

rot1.s() = rot1.c() * u;

new:

RealScalar t2d2 = numext::hypot(t,d);

rot1.c() = abs(t)/t2d2;

rot1.s() = d/t2d2;

if(t<RealScalar(0))

rot1.s() = -rot1.s();

the old one is subject to underflow and overflow issues, and it does not pass our unit tests. I'm open to better suggestions for this portion of the code. Its purpose is to construct a rotation R such that R * M is symmetric (M being real and 2x2) with t and d as follows:

t = m(0,0) + m(1,1);

d = m(1,0) - m(0,1);

cheers,

gael

On Wed, Jun 3, 2015 at 9:28 PM, Rob Conde <rob.conde@xxxxxxxxxxxxxxxx> wrote:

I'm not sure if this is a sign of anything wrong, but I noticed the following change in updating from eigen 3.2.1 to 3.2.4 using Visual Studio 2013.

For the matrix:

1 2 3

0 0 0

7 8 9

JacobiSVD used to give 0 as the minimum singular value. Now it is 1.4079439049813084e-033

MATLAB and Wolfram Alpha give 0.

Follow-Ups:

Re: [eigen] Changed behavior of jacobisvd

From:Rob Conde

References:

[eigen] Changed behavior of jacobisvd

From:Rob Conde

Messages sorted by:[ date | thread ]- Prev by Date:
Re: [eigen] when CUDA can be supported by Eigen- Next by Date:
Re: [eigen] Changed behavior of jacobisvd- Previous by thread:
[eigen] Changed behavior of jacobisvd- Next by thread:
Re: [eigen] Changed behavior of jacobisvd

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