#include <bits/stdc++.h>
using namespace std;
int next_flag(double first, double second, int f_speed, int s_speed, int f_f,
              int s_f) {
  if (abs(f_f - first) / f_speed < abs(s_f - second) / s_speed)
    return 1;
  else
    return 2;
}
int main() {
  int times;
  cin >> times;
  while (times--) {
    int n, l;
    cin >> n >> l;
    int flags[n];
    for (int i = 0; i < n; ++i) {
      int temp;
      cin >> temp;
      flags[i] = temp;
    }
    double time = 0;
    int f_f = 0, f_l = n - 1;
    double car1 = 0, car2 = l;
    int car1_speed = 1, car2_speed = 1;
    while (f_f <= f_l) {
      int move =
          next_flag(car1, car2, car1_speed, car2_speed, flags[f_f], flags[f_l]);
      if (move == 1) {
        double temp = abs(flags[f_f] - car1) / (double)car1_speed;
        time += temp;
        car1 += temp * car1_speed;
        car2 -= temp * car2_speed;
        if (car2 == flags[f_l]) {
          ++car2_speed;
          --f_l;
        }
        ++f_f;
        ++car1_speed;
      } else {
        double temp = abs(flags[f_l] - car2) / (double)car2_speed;
        time += temp;
        car1 += temp * car1_speed;
        car2 -= temp * car2_speed;
        if (car1 == flags[f_f]) {
          ++car1_speed;
          ++f_f;
        }
        --f_l;
        ++car2_speed;
      }
    }
    double length = car2 - car1;
    printf("%.7lf\n", time + length / (car1_speed + car2_speed));
  }
  return 0;
}
