#include <bits/stdc++.h>
using namespace std;
const int size1 = 3e5 + 7;
const int size2 = 1e3 + 7;
const long long mod = 998244353;
const long double epsi = 1e-6;
int main() {
  cout << setprecision(12) << fixed;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long T;
  cin >> T;
  long long cas = 1;
  while (T--) {
    long long n, l;
    cin >> n >> l;
    long double lo = 0.0, hi = l + 0.0;
    vector<long double> arr;
    for (long long i = 0; i < n; i++) {
      long double x;
      cin >> x;
      arr.push_back(x);
    }
    long double ans = -1;
    while (lo <= hi) {
      long double meetingPoint = (lo + hi) / (2.0);
      long double t1 = 0, t2 = 0;
      long double prev = 0;
      long double currSpeed = 1.0;
      long double dist = 0, tim = 0;
      for (long long i = 0; i < n; i++) {
        if (arr[i] >= meetingPoint) {
          dist = (meetingPoint - prev);
          tim = dist / currSpeed;
          t1 += tim;
          prev = meetingPoint;
          break;
        }
        dist = (arr[i] - prev);
        tim = dist / currSpeed;
        t1 += tim;
        currSpeed++;
        prev = arr[i];
      }
      if (meetingPoint > prev) {
        dist = (meetingPoint - prev);
        tim = dist / currSpeed;
        t1 += tim;
      }
      prev = l;
      currSpeed = 1.0;
      for (long long i = n - 1; i >= 0; i--) {
        if (arr[i] <= meetingPoint) {
          dist = (prev - meetingPoint);
          tim = dist / currSpeed;
          t2 += tim;
          prev = meetingPoint;
          break;
        }
        dist = (prev - arr[i]);
        tim = dist / currSpeed;
        t2 += tim;
        currSpeed++;
        prev = arr[i];
      }
      if (meetingPoint < prev) {
        dist = (prev - meetingPoint);
        tim = dist / currSpeed;
        t2 += tim;
      }
      if (abs(t1 - t2) < epsi) {
        ans = t1;
        break;
      }
      if (t1 < t2) {
        lo = meetingPoint;
      } else {
        hi = meetingPoint;
      }
    }
    cout << ans << endl;
  }
}
