⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_rotm.c

📁 开放gsl矩阵运算
💻 C
📖 第 1 页 / 共 3 页
字号:
#include <gsl/gsl_test.h>#include <gsl/gsl_ieee_utils.h>#include <gsl/gsl_math.h>#include "gsl_cblas.h"#include "tests.h"voidtest_rotm (void) {const double flteps = 1e-4, dbleps = 1e-6;  {   int N = 1;   float h[] = { -1.0f, -4.44982e+03f, -15.5826f, 7.091334e+04f, 2.95912e+04f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { -3.956017e+04f };   float y_expected[] = { -1.657054e+04f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 654)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 655)");     }   };  };  {   int N = 1;   float h[] = { 0.0f, 15.9728f, 6.400638e+03f, 1.733082e-05f, 1.524511e-04f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { -0.0340097f };   float y_expected[] = { -218.182f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 656)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 657)");     }   };  };  {   int N = 1;   float h[] = { 1.0f, 5.688411e+04f, 5.914789e+03f, 0.00210473f, 0.0231019f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { -1.93462e+03f };   float y_expected[] = { 0.0210629f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 658)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 659)");     }   };  };  {   int N = 1;   float h[] = { -2.0f, -0.582083f, 0.00103161f, -3.429851e-05f, 7.411469e-05f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { -0.034f };   float y_expected[] = { -0.56f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 660)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 661)");     }   };  };  {   int N = 1;   float h[] = { -1.0f, 115.163f, -6.715448e+04f, -258.695f, -16.2552f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { 140.954f };   float y_expected[] = { 2.292355e+03f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 662)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 663)");     }   };  };  {   int N = 1;   float h[] = { 0.0f, -3.314862e+03f, -442.976f, -214.586f, -25.9716f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { 120.134f };   float y_expected[] = { 14.5012f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 664)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 665)");     }   };  };  {   int N = 1;   float h[] = { 1.0f, -1.177304e+03f, -1.236662e-04f, -0.186585f, 1.15841f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { 39.4683f };   float y_expected[] = { -0.614711f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 666)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 667)");     }   };  };  {   int N = 1;   float h[] = { -2.0f, -88.9796f, 0.808226f, 1.106582e-05f, -0.00862288f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { -0.034f };   float y_expected[] = { -0.56f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 668)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 669)");     }   };  };  {   int N = 1;   float h[] = { -1.0f, -0.00225865f, 8.338551e+04f, -1.98282f, -2.409905e-05f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { 1.11046f };   float y_expected[] = { -2.835107e+03f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 670)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 671)");     }   };  };  {   int N = 1;   float h[] = { 0.0f, 0.258779f, 74.2802f, 0.923299f, 4.847128e+03f };   float X[] = { -0.034f };   int incX = 1;   float Y[] = { -0.56f };   int incY = -1;   float x_expected[] = { -0.551048f };   float y_expected[] = { -3.08553f };   cblas_srotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], flteps, "srotm(case 672)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], flteps, "srotm(case 673)");     }   };  };  {   int N = 1;   double h[] = { -1.0, -8.00850735044, 0.0204647351647, 1.898461360078e-04, -4.32701487194 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { -6.72728115497 };   double y_expected[] = { 3.09369795149 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 674)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 675)");     }   };  };  {   int N = 1;   double h[] = { 0.0, 1.230610998905e+04, 210.056650134, 9.20757074452, 2.072879691524e+03 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { -5.70658279935 };   double y_expected[] = { 175.736586112 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 676)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 677)");     }   };  };  {   int N = 1;   double h[] = { 1.0, -1.244580625511e+03, 1.11154682624, 2.269384716089e-05, -0.0143785338883 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { -1.046158725429e+03 };   double y_expected[] = { -0.829776862405 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 678)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 679)");     }   };  };  {   int N = 1;   double h[] = { -2.0, 293.927527276, -2.614737743134e+03, 10.3164975867, -7.947030813329e+03 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { 0.84 };   double y_expected[] = { -0.711 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 680)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 681)");     }   };  };  {   int N = 1;   double h[] = { -1.0, -0.0178609251786, 0.00983044958941, 105.944529127, 1.687350579234e-05 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { -75.3415633866 };   double y_expected[] = { 0.00824558059248 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 682)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 683)");     }   };  };  {   int N = 1;   double h[] = { 0.0, 6.241999071283e-05, 2.495425882445e+03, 304.604891146, 1.604644714854e+04 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { -215.734077605 };   double y_expected[] = { 2.095446741254e+03 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 684)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 685)");     }   };  };  {   int N = 1;   double h[] = { 1.0, -0.058097639487, 8.386083625428e+03, -10.5233229994, 184.653245391 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { -0.759802017169 };   double y_expected[] = { -132.128457473 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 686)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 687)");     }   };  };  {   int N = 1;   double h[] = { -2.0, -92.8754629217, 1.467547244529e-04, -3.197881072301e-04, -1.89874629713 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { 0.84 };   double y_expected[] = { -0.711 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 688)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 689)");     }   };  };  {   int N = 1;   double h[] = { -1.0, -0.0961996230646, -2.248344186185e-05, -316.856396787, 1.663969157848e+03 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { 225.204090432 };   double y_expected[] = { -1.183082090116e+03 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 690)");     }   };   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(Y[i], y_expected[i], dbleps, "drotm(case 691)");     }   };  };  {   int N = 1;   double h[] = { 0.0, -201.862043128, 4.999906166451e-04, -0.0653365534487, 586.454083328 };   double X[] = { 0.84 };   int incX = 1;   double Y[] = { -0.711 };   int incY = -1;   double x_expected[] = { 0.886454289502 };   double y_expected[] = { -0.710580007882 };   cblas_drotm(N, X, incX, Y, incY, h);   {     int i;     for (i = 0; i < 1; i++) {       gsl_test_rel(X[i], x_expected[i], dbleps, "drotm(case 692)");     }   };   {     int i;     for (i = 0; i < 1; i++) {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -