1 #include <gsl/gsl_test.h>
2 #include <gsl/gsl_ieee_utils.h>
3 #include <gsl/gsl_math.h>
4 #include <gsl/gsl_cblas.h>
10 const double flteps = 1e-4, dbleps = 1e-6;
16 float alpha[2] = {-1.0f, 0.0f};
17 float A[] = { -0.821f, 0.954f };
18 float X[] = { 0.532f, 0.802f };
20 float Y[] = { 0.016f, -0.334f };
22 float A_expected[] = { -0.302288f, 0.0f };
23 cblas_cher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
26 for (i = 0; i < 1; i++) {
27 gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher2(case 1450) real");
28 gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher2(case 1450) imag");
39 float alpha[2] = {-1.0f, 0.0f};
40 float A[] = { -0.821f, 0.954f };
41 float X[] = { 0.532f, 0.802f };
43 float Y[] = { 0.016f, -0.334f };
45 float A_expected[] = { -0.302288f, 0.0f };
46 cblas_cher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
49 for (i = 0; i < 1; i++) {
50 gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher2(case 1451) real");
51 gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher2(case 1451) imag");
62 float alpha[2] = {-1.0f, 0.0f};
63 float A[] = { -0.821f, 0.954f };
64 float X[] = { 0.532f, 0.802f };
66 float Y[] = { 0.016f, -0.334f };
68 float A_expected[] = { -0.302288f, 0.0f };
69 cblas_cher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
72 for (i = 0; i < 1; i++) {
73 gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher2(case 1452) real");
74 gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher2(case 1452) imag");
85 float alpha[2] = {-1.0f, 0.0f};
86 float A[] = { -0.821f, 0.954f };
87 float X[] = { 0.532f, 0.802f };
89 float Y[] = { 0.016f, -0.334f };
91 float A_expected[] = { -0.302288f, 0.0f };
92 cblas_cher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
95 for (i = 0; i < 1; i++) {
96 gsl_test_rel(A[2*i], A_expected[2*i], flteps, "cher2(case 1453) real");
97 gsl_test_rel(A[2*i+1], A_expected[2*i+1], flteps, "cher2(case 1453) imag");
108 double alpha[2] = {-0.3, 0.1};
109 double A[] = { -0.334, 0.286 };
110 double X[] = { -0.14, -0.135 };
112 double Y[] = { 0.455, 0.358 };
114 double A_expected[] = { -0.264521, 0.0 };
115 cblas_zher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
118 for (i = 0; i < 1; i++) {
119 gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher2(case 1454) real");
120 gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher2(case 1454) imag");
131 double alpha[2] = {-0.3, 0.1};
132 double A[] = { -0.334, 0.286 };
133 double X[] = { -0.14, -0.135 };
135 double Y[] = { 0.455, 0.358 };
137 double A_expected[] = { -0.264521, 0.0 };
138 cblas_zher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
141 for (i = 0; i < 1; i++) {
142 gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher2(case 1455) real");
143 gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher2(case 1455) imag");
154 double alpha[2] = {-0.3, 0.1};
155 double A[] = { -0.334, 0.286 };
156 double X[] = { -0.14, -0.135 };
158 double Y[] = { 0.455, 0.358 };
160 double A_expected[] = { -0.264521, 0.0 };
161 cblas_zher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
164 for (i = 0; i < 1; i++) {
165 gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher2(case 1456) real");
166 gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher2(case 1456) imag");
177 double alpha[2] = {-0.3, 0.1};
178 double A[] = { -0.334, 0.286 };
179 double X[] = { -0.14, -0.135 };
181 double Y[] = { 0.455, 0.358 };
183 double A_expected[] = { -0.264521, 0.0 };
184 cblas_zher2(order, uplo, N, alpha, X, incX, Y, incY, A, lda);
187 for (i = 0; i < 1; i++) {
188 gsl_test_rel(A[2*i], A_expected[2*i], dbleps, "zher2(case 1457) real");
189 gsl_test_rel(A[2*i+1], A_expected[2*i+1], dbleps, "zher2(case 1457) imag");