Re: hard-coded program for 3x3 matrix square root?



On Tue, 25 Mar 2008 21:32:52 -0700, "huhua" <lunamoonmoon@xxxxxxxxx>
wrote:

Hi all,

I need a matrix square root function in C/C++.

I only need it for 3x3 matrix, so I decide to find some hard-coded piece of
program, instead of using some numerical library, because then I have to
learn some new API and how to link and how to use stuff.

To avoid the trouble, I think a 3x3 hard-coded program is sufficient for me.
That's to say, given M a 3x3 matrix, I want to find M^(0.5) in C/C++.

Any place I can find some simple matrix square root function? I don't want
to use those huge library, because compiling them and try to make them work
will talke a while... for example, I have tried compiling CALAPACK... it
seemed very complicated...

Any thoughts on that?


How about using a nested loop and sqrt function?
.