30 puts(
"############ Test the Givens algorithm ###############");
39 printf(
"c = %7.4f\n", c_s_t_r_vec[0]);
40 printf(
"s = %7.4f\n", c_s_t_r_vec[1]);
41 printf(
"t = %7.4f\n", c_s_t_r_vec[2]);
42 printf(
"r = %7.4f\n", c_s_t_r_vec[3]);
44 puts(
"************ MATRIX A ************");
46 { 0.8147, 0.1576, 0.6557, 0.7060, 0.4387 },
47 { 0.9058, 0.9706, 0.0357, 0.0318, 0.3816 },
48 { 0.1270, 0.9572, 0.8491, 0.2769, 0.7655 },
49 { 0.9134, 0.4854, 0.9340, 0.0462, 0.7952 },
50 { 0.6324, 0.8003, 0.6787, 0.0971, 0.1869 },
51 { 0.0975, 0.1419, 0.7577, 0.8235, 0.4898 },
52 { 0.2785, 0.4218, 0.7431, 0.6948, 0.4456 },
53 { 0.5469, 0.9157, 0.3922, 0.3171, 0.6463 },
54 { 0.9575, 0.7922, 0.6555, 0.9502, 0.7094 },
55 { 0.9649, 0.9595, 0.1712, 0.0344, 0.7547 }
64 puts(
"+++++++ Reduced QR-form +++++++");
73 puts(
"+++++++ Full QR-form +++++++");
83 puts(
"************ MATRIX B ************");
86 { 0.8147, 0.5469, 0.8003, 0.0357, 0.6555, 0.8235, 0.7655 },
87 { 0.9058, 0.9575, 0.1419, 0.8491, 0.1712, 0.6948, 0.7952 },
88 { 0.1270, 0.9649, 0.4218, 0.9340, 0.7060, 0.3171, 0.1869 },
89 { 0.9134, 0.1576, 0.9157, 0.6787, 0.0318, 0.9502, 0.4898 },
90 { 0.6324, 0.9706, 0.7922, 0.7577, 0.2769, 0.0344, 0.4456 },
91 { 0.0975, 0.9572, 0.9595, 0.7431, 0.0462, 0.4387, 0.6463 },
92 { 0.2785, 0.4854, 0.6557, 0.3922, 0.0971, 0.3816, 0.7094 }
97 puts(
"+++++++ Reduced QR-form +++++++");
106 puts(
"+++++++ Full QR-form +++++++");