pseudoSqrt() and rankReducedSqrt()

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

pseudoSqrt() and rankReducedSqrt()

Li, Peter

Hi, Luigi,

in pseudoSqrt.cpp the checking of symmetric matrix may fail due to rounding errors in construction of a matrix.

For safety, line 235 and 343

 

           QL_REQUIRE(matrix[i][j] == matrix[j][i],

                           "matrix not symmetric");

 

should be changed to  QL_REQUIRE(fabs(matrix[i][j] -matrix[j][i])< QL_EPSILON ,

                           "matrix not symmetric");

 

The current check thinks

0.026098788171586292  0.026098788171586288 are different.

 

Thanks.

 

------------------------------------

Peter Li 

 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: pseudoSqrt() and rankReducedSqrt()

Luigi Ballabio
On Thu, 2007-03-15 at 10:36 -0400, Li, Peter wrote:
> in pseudoSqrt.cpp the checking of symmetric matrix may fail due to
> rounding errors in construction of a matrix.

Fixed, thanks. Not by me, I must add.

Luigi


----------------------------------------

Anyone who says he can see through women is missing a lot.
-- Groucho Marx



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: pseudoSqrt() and rankReducedSqrt()

Li, Peter
Hi,
Here it is to confirm that the symmetric matrix checking failure has
been fixed.

Thanks.

------------------------------------
Peter Li

-----Original Message-----
From: Luigi Ballabio [mailto:[hidden email]]
Sent: Thursday, March 22, 2007 7:57 AM
To: Li, Peter
Cc: [hidden email]
Subject: Re: [Quantlib-dev] pseudoSqrt() and rankReducedSqrt()

On Thu, 2007-03-15 at 10:36 -0400, Li, Peter wrote:
> in pseudoSqrt.cpp the checking of symmetric matrix may fail due to
> rounding errors in construction of a matrix.

Fixed, thanks. Not by me, I must add.

Luigi


----------------------------------------

Anyone who says he can see through women is missing a lot.
-- Groucho Marx



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: pseudoSqrt() and rankReducedSqrt()

Luigi Ballabio

On Apr 10, 2007, at 1:26 PM, Li, Peter wrote:

> Hi,
> Here it is to confirm that the symmetric matrix checking failure has
> been fixed.

Ok, thanks.

Luigi


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev