#include <bits/stdc++.h>
using namespace std;
long long a[1000001];
double x1[2000001];
double x2[2000001];
int main() {
  double tam, tam2, time, tam3;
  long long t, n, l, i, k, pos;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    for (i = 1; i <= n; i++) cin >> a[i];
    sort(a + 1, a + 1 + n);
    n++;
    a[n] = k;
    x1[0] = 0.0;
    x2[n] = 0.0;
    a[0] = 0;
    for (i = 1; i <= n; i++) {
      tam = a[i] - a[i - 1];
      tam2 = i;
      x1[i] = x1[i - 1] + tam / tam2;
    }
    for (i = n - 1; i >= 0; i--) {
      tam = a[i + 1] - a[i];
      tam2 = n - i;
      x2[i] = x2[i + 1] + tam / tam2;
    }
    pos = 0;
    for (i = 0; i <= n - 1; i++) {
      if (x1[i] <= x2[i] && x1[i + 1] > x2[i + 1]) {
        pos = i;
        break;
      }
    }
    cout << fixed;
    cout << setprecision(7);
    if (x1[pos] > x2[pos + 1]) {
      time = x1[pos] - x2[pos + 1];
      tam3 = n - pos;
      tam = a[pos + 1] - a[pos] - time * tam3;
      tam2 = n + 1;
      cout << x1[pos] + tam / tam2 << endl;
    }
    if (x1[pos] < x2[pos + 1]) {
      time = x2[pos + 1] - x1[pos];
      tam3 = pos + 1;
      tam = a[pos + 1] - a[pos] - time * tam3;
      tam2 = n + 1;
      cout << x2[pos + 1] + tam / tam2 << endl;
    }
    if (x1[pos] == x2[pos + 1]) {
      tam = a[pos + 1] - a[pos];
      tam2 = n + 1;
      cout << x1[pos] + tam / tam2 << endl;
    }
  }
}
