#include <bits/stdc++.h>
using namespace std;
int main() {
  long long e, n, i, k, l, r, c1, c2;
  cin >> e;
  double ans, s1, s2, p1, p2;
  while (e--) {
    ans = 0;
    cin >> n >> k;
    double a[n];
    for (i = 0; i < n; i++) cin >> a[i];
    l = -1, r = n;
    s1 = 0, s2 = k;
    c1 = 1, c2 = 1;
    while (l < (r - 1)) {
      p1 = double(1.0 * (a[l + 1] - s1) / c1 * 1.0);
      p2 = double(1.0 * (s2 - a[r - 1]) / c2 * 1.0);
      if (p1 == p2) {
        ans += p1;
        c1++;
        c2++;
        s1 = a[l + 1];
        s2 = a[r - 1];
        l++, r--;
      } else if (p1 > p2) {
        s1 = s1 + p2 * c1;
        s2 = a[r - 1];
        c2++;
        r--;
        ans += p2;
      } else {
        s2 = s2 - p1 * c2;
        s1 = a[l + 1];
        c1++;
        l++;
        ans += p1;
      }
    }
    ans = ans + double(1.0 * (s2 - s1) / (c1 + c2) * 1.0);
    printf("%.8lf\n", ans);
  }
}
