#include <bits/stdc++.h>
const double PI = 3.141592653589793238460;
using namespace std;
long long pows(long long a, long long n, long long m) {
  long long res = 1;
  while (n) {
    if (n % 2 != 0) {
      res = (res * a) % m;
      n--;
    } else {
      a = (a * a) % m;
      n = n / 2;
    }
  }
  return res % m;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
bool isprime(long long n) {
  if (n == 1) {
    return false;
  }
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
bool istrue(string s) {
  int i = 0;
  int j = s.size() - 1;
  while (i < j) {
    if (s[i] == s[j]) {
      i++;
      j--;
    } else {
      return false;
    }
  }
  return true;
}
long long n, d;
long double a[100001];
long double f(long double t) {
  long double curr1 = 0;
  long long currspeed1 = 1;
  long double time1 = 0;
  int target;
  for (int i = 0; i <= n; i++) {
    if (i == n) {
      target = d;
    } else
      target = a[i];
    long double req = (target - curr1) / currspeed1;
    curr1 = min(curr1 + (min(req, t - time1)) * currspeed1, (long double)d);
    time1 = time1 + min(req, t - time1);
    if (curr1 < target) {
      break;
    }
    currspeed1++;
  }
  long double curr2 = d;
  long long currspeed2 = 1;
  long double time2 = 0;
  for (int i = n - 1; i >= -1; i--) {
    if (i == -1)
      target = 0;
    else
      target = a[i];
    long double req = (curr2 - target) / currspeed2;
    curr2 = max((long double)0, curr2 - min(req, t - time2) * currspeed2);
    time2 = time2 + min(req, t - time2);
    if (curr2 > target) {
      break;
    }
    currspeed2++;
  }
  return curr1 >= curr2;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> d;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    long double l = -1;
    long double r = 1e9 + 7;
    for (int i = 0; i <= 60; i++) {
      long double m = (l + r) / 2;
      if (f(m) == true) {
        r = m;
      } else {
        l = m;
      }
    }
    cout << setprecision(10) << r << endl;
  }
}
