#include <bits/stdc++.h>
const long long int inf = 1e9 + 44;
const int MAX = 3e5 + 9;
const long long int MOD = 1e9 + 7;
const double eps = 1e-10;
double const PI = 3.1415926535897931;
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, d;
    cin >> n >> d;
    double res = 0, arr[n + 1], tim = 0, a = 0, b = d;
    for (int i = 1; i <= n; i++) cin >> arr[i];
    int l = 1, r = n;
    while (true) {
      double tim = min((arr[l] - a) / l, (b - arr[r]) / (n - r + 1));
      res = res + tim;
      a = a + tim * l;
      b = b - tim * (n - r + 1);
      if (abs(a - arr[l]) <= eps) l++;
      if (abs(b - arr[r]) <= eps) r--;
      if (l > r) {
        res = res + (b - a) / (l + n - r + 1);
        break;
      }
    }
    cout << setprecision(10) << res << endl;
  }
}
