#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 5;
const int mod = 1e9 + 7;
const double eps = 1e-9;
long long qpow(long long a, long long b) {
  long long ans = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b > 0 ? gcd(b, a % b) : a; }
int n, m, T;
int a[maxn];
double p[3][maxn];
int check(double t) {
  if (t > p[1][n + 1]) return 1;
  if (t > p[2][0]) return 1;
  double x, y;
  for (int i = 0; i <= n; i++) {
    if (t >= p[1][i] && t <= p[1][i + 1]) {
      x = (t - p[1][i]) * (i + 1) + a[i];
      break;
    }
  }
  for (int i = n + 1; i >= 1; i--) {
    if (t >= p[2][i] && t <= p[2][i - 1]) {
      y = a[i] - (t - p[2][i]) * (n - i + 1 + 1);
      break;
    }
  }
  if (abs(x - y) < eps) {
    return 0;
  } else if (x > y) {
    return 1;
  } else {
    return -1;
  }
}
int main() {
  cin >> T;
  while (T--) {
    cin >> n >> m;
    for (int i = 1; i <= n; i++) cin >> a[i];
    a[0] = 0;
    a[n + 1] = m;
    p[1][0] = 0;
    p[2][n + 1] = 0;
    for (int i = 1; i <= n + 1; i++) {
      p[1][i] = 1.0 * (a[i] - a[i - 1]) / i + p[1][i - 1];
    }
    for (int i = n; i >= 0; i--) {
      p[2][i] = 1.0 * (a[i + 1] - a[i]) / (n - i + 1) + p[2][i + 1];
    }
    a[n + 1] = m, a[0] = 0;
    double l = 0, r = m, mid;
    for (int i = 1; i <= 100; i++) {
      mid = (l + r) / 2;
      int res = check(mid);
      if (res == 0)
        break;
      else if (res == 1)
        r = mid;
      else
        l = mid;
    }
    printf("%.6f\n", mid);
  }
  return 0;
}
