xjiang4 / ellipsoids

Automatically exported from code.google.com/p/ellipsoids
Other
0 stars 1 forks source link

Implement gras.gen.sqrtpos and use it instead of sqrt for positive numbers #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We already have gras.sqrtmpos function that is designed for extracting square 
roots from positively definite matrices. We need to create a new function 
gras.gen.sqrtpos that works EXACTLY as sqrtmpos for matrices 1x1. The 
equivalence of these functions for scalar inputs should be very thoroughly 
verified by the tests. 

Once the function is implemented we need to replace all the calls of the 
built-in sqrt function, applied to the positive inputs, with sqrtpos function

Example: sqrt(lVec.'*shMat*lVec) needs to be replaced with 

gras.gen.sqrtpos(lVec.'*shMat*lVec,absTol)

Original issue reported on code.google.com by heartofm...@gmail.com on 16 Apr 2013 at 3:08

GoogleCodeExporter commented 8 years ago

Original comment by heartofm...@gmail.com on 1 May 2013 at 4:22