SHARE
TWEET

aa

a guest Oct 23rd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int k;
  2.     printf("Entrer le mode d'arrondi: ");
  3.     scanf_s("%d", &k);
  4.     switch (k) {
  5.     case 0: fesetround(FE_TOWARDZERO); break;
  6.     case 1: fesetround(FE_TONEAREST); break;
  7.     case 2: fesetround(FE_UPWARD); break;
  8.     case 3: fesetround(FE_DOWNWARD); break;
  9.     };
  10.     double h[121];
  11.     double un = 1.0;
  12.     for (int i = 0; i < 11; i++){
  13.         for (int j = 0; j < 11; j++)
  14.             h[i * 11 + j] = un / (i + j + 1);
  15.     }
  16.     double det;
  17.     gauss_det(h, 11, &det);
  18.     printf("Det Gauss: %24.15e\n", det);
  19.     printf("Det Hilbert: %24.15e\n", det_hilbert(11));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top