#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y);
long long int gcd(long long int a, long long int b);
long long int power(long long int x, long long int y);
long long int gcd(long long int a, long long int b);
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, l;
    cin >> n >> l;
    long double a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    long double s = 1, e = 1;
    long long int si = 0, ei = n - 1;
    long double ans = 0.0, csi = 0.0, cei = l;
    while (1) {
      if ((si + 1) == ei) {
        long double f = (a[si] - csi) / s;
        long double l = (cei - a[ei]) / e;
        if (f == l) {
          ans += f;
          s++;
          e++;
          csi = a[si];
          cei = a[ei];
          ans += (cei - csi) / (s + e);
          break;
        } else if (f < l) {
          ans += f;
          cei -= (e)*f;
          csi = a[si];
          si++;
          s++;
        } else {
          ans += l;
          cei = a[ei];
          csi += (s)*l;
          e++;
          ei--;
        }
      }
      if (si == ei) {
        long double f = (a[si] - csi) / s;
        long double l = (cei - a[ei]) / e;
        if (f == l) {
          ans += f;
        } else if (f < l) {
          ans += f;
          cei -= (e)*f;
          csi = a[si];
          s++;
          ans += (cei - csi) / (s + e);
        } else {
          ans += l;
          cei = a[ei];
          csi += (s)*l;
          e++;
          ans += (cei - csi) / (s + e);
        }
        break;
      }
      long double f = (a[si] - csi) / s;
      long double l = (cei - a[ei]) / e;
      if (f == l) {
        ans += f;
        csi = a[si];
        cei = a[ei];
        si++;
        ei--;
        s++;
        e++;
      } else if (f < l) {
        long double curr = 0.0;
        while (1) {
          long double ff = (a[si] - csi) / s;
          if ((si + 1) == ei || si == ei) {
            break;
          }
          if ((curr + ff) > l) {
            curr = l - curr;
            ans += curr;
            csi += (s)*curr;
            cei -= (e)*curr;
            break;
          }
          csi = a[si];
          cei -= (e)*ff;
          si++;
          s++;
          curr += ff;
          ans += ff;
        }
      } else {
        long double curr = 0.0;
        while (1) {
          long double lll = (cei - a[ei]) / e;
          if ((si + 1) == ei || si == ei) {
            break;
          }
          if ((curr + lll) > f) {
            curr = f - curr;
            ans += curr;
            csi += (s)*curr;
            cei -= (e)*curr;
            break;
          }
          cei = a[ei];
          csi += (s)*lll;
          ei--;
          e++;
          curr += lll;
          ans += lll;
        }
      }
    }
    cout << fixed << setprecision(10) << ans << "\n";
  }
}
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x %= 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res % 1000000007;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
