Question: Maple -> C translation of solving for square root of a matrix?

Hi all,

I am trying to use Maple -> C translation facility for a special use:

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++.

I tried Maple, but it seems strange:

I gave it a simple 3x3 matrix, and used "MatrixPower" function.

After half an our or more, it says "output exceed 1000000 lines".

So I didn't continue, I am afraid that even I get it translated to C/C++, it
will be a huge piece of the code and actually a mess...

Any thoughts on that?

Thanks!

 

Please Wait...