#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n, l;
    cin >> n >> l;
    vector<int> a(n + 2);
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    a[n + 1] = l;
    vector<pair<double, double>> a1(n + 2);
    vector<pair<double, double>> a2(n + 2);
    a1[0] = make_pair(1, 0);
    a2[n + 1] = make_pair(1, 0);
    for (int i = 1; i <= n; i++) {
      a1[i] = make_pair(
          a1[i - 1].first + 1,
          abs(a[i] - a[i - 1]) / (a1[i - 1].first) + a1[i - 1].second);
    }
    for (int i = n; i >= 0; i--) {
      a2[i] = make_pair(
          a2[i + 1].first + 1,
          abs((a[i] - a[i + 1])) / (a2[i + 1].first) + a2[i + 1].second);
    }
    int x = 0;
    for (int i = 0; i <= n + 1; i++) {
      if (a1[i].second < a2[i].second) {
        x++;
      } else
        break;
    }
    x--;
    double d = abs(a[x + 1] - a[x]);
    if (a1[x].second > a2[x + 1].second) {
      d -= (a1[x].second - a2[x + 1].second) * a2[x + 1].first;
    } else {
      d -= (a2[x + 1].second - a1[x].second) * a1[x].first;
    }
    double time = max(a1[x].second, a2[x + 1].second) +
                  d / (a1[x].first + a2[x + 1].first);
    cout << setprecision(6) << fixed << time << '\n';
  }
  return 0;
}
