#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int32_t main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t;
  t = 1;
  cin >> t;
  for (long long tc = 0; tc < t; tc++) {
    long long n, l;
    cin >> n >> l;
    vector<long long> arr(n);
    vector<long double> tm1(n), tm2(n);
    for (long long i1 = 0; i1 < n; i1++) cin >> arr[i1];
    long long s = 0, v1 = 1;
    long double prev = (long double)0.00;
    for (long long i = 0; i < n; i++) {
      long double temp = (long double)(arr[i] - s) / (long double)v1;
      s = arr[i];
      tm1[i] = temp + prev;
      prev = tm1[i];
      v1++;
    }
    prev = (long double)0.00;
    long long v2 = 1, e = l;
    for (long long i = n - 1; i >= 0; i--) {
      long double temp = (long double)(e - arr[i]) / (long double)v2;
      e = arr[i];
      tm2[i] = temp + prev;
      prev = tm2[i];
      v2++;
    }
    s = 0, e = n - 1;
    while (s < e) {
      if (tm1[s] < tm2[e]) {
        s++;
      } else if (tm1[s] > tm2[e]) {
        e--;
      } else {
        s++;
        e--;
      }
    }
    if (s > e) {
      s--;
      e++;
    }
    long long a = arr[s], b = arr[e];
    v1 = 1 + s + 1, v2 = 1 + (n - 1 - e + 1);
    long double tma = tm1[s], tmb = tm2[e];
    if (s == e) {
      if (tm1[s] < tm2[e]) {
        e++;
        if (e >= n) {
          b = l;
          tmb = 0;
          v2 = 1;
        } else {
          b = arr[e];
          v2 = 1 + (n - 1 - e + 1);
          tmb = tm2[e];
        }
      } else {
        s--;
        if (s < 0) {
          a = 0;
          v1 = 1;
          tma = 0;
        } else {
          a = arr[s];
          v1 = 1 + s + 1;
          tma = tm1[s];
        }
      }
    }
    long double ans =
        (long double)(b - a + v1 * (long double)tma + v2 * (long double)tmb) /
        (long double)(v1 + v2);
    cout << fixed << setprecision(12) << ans << "\n";
  }
  return 0;
}
