Matrix-exponentiation operator: Difference between revisions

m
→‎{{header|C++}}: simplification
(add FreeBASIC)
m (→‎{{header|C++}}: simplification)
Line 656:
for (int i = 0; i < MSize; i++) {
for (int j = 0; j < MSize; j++)
os << p.a[i][j] << "',"';
os << endl;
}
Line 691:
int main() {
double q = sqrt(0.5);
creal array[3][3] = { { { q, 0 }, { q, 0 }, { 0, 0 } },
{ {creal( 0, -q }, { 0), creal(q, 0)}, creal({ 0, 0) } },
{creal( { 0, -q), creal(0, q)}, creal({ 0, 0) }, { 0, 1 } } };
M3 m(array);
{creal(0, 0), creal(0, 0), creal(0, 1)}};
 
M3 m(array);
 
Line 702 ⟶ 703:
return 0;
}</lang>
{{out}}
Output:
<pre>
m ^ 23=
Anonymous user