#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define double long double
#define mod 1000000007
#define pll pair<long long,long long>
#define pdd pair<long double,long double>
#define vll vector<ll>
#define rep(i,j,n) for(int i=j;i<n;i++)
#define mp make_pair
#define pb push_back
#define pf push_front
#define inf 1e17
#define N 100010
priority_queue<pll,vector<pll>,greater<pll> >pq;
priority_queue<ll,vector<ll>,greater<ll> >pq1;

ll result(ll a, ll b, ll p){
    ll ans=1;
    if(b==(-1))
        b=p-2;
    while(b){
        if(b&1){
            ans=(ans*a)%p;
        }
        a=(a*a)%p;
        b>>=1;
    }
    return ans;
}

ll T = 1,n,m,k;

int main(){
    if(fopen("input.txt", "r"))
    freopen("input.txt", "r", stdin),
    freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    cin >> T;
    while(T--){
        ll l;
        cin >> n >> l;
        double a[n];
        for(int i=0;i<n;i++)
            cin >> a[i];

        double s1 = 1.0;
        double s2 = 1.0;
        double ans = 0;

        ll i=0, j=n-1;
        double pos1 = 0;
        double pos2 = l;

        while(i<=j){

            double p1 = (a[i] - pos1) / s1;
            double p2 = (pos2 - a[j]) / s2;
            if(p1 < p2){
                pos1 = a[i];
                i++;
                s1 = s1 + 1.0;
                pos2 = pos2 - (s2 * p1);
                ans = ans + p1;
            }
            else if(p1 > p2){
                pos2 = a[j];
                j--;
                s2 = s2 + 1.0;
                pos1 = pos1 + (s1 * p2);
                ans = ans + p2;
            }
            else{
                pos1 = pos1 + s1 * p1;
                i++;
                pos2 = pos2 - s2 * p2;
                j--;
                s1 = s1 + 1.0;
                s2 = s2 + 1.0;
                ans = ans + p1;
            }
            // cout << ans << " " << pos1 <<  " " << pos2 << "\n";
        }
        // cout << ans << " " << pos1 <<  " " << pos2 << "\n";
        {
            double d = pos2 - pos1;
            ans = ans + (d * 1.0) / (s1 + s2);
        }
        cout << setprecision(50) << ans << "\n";

    }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define double long double
#define mod 1000000007
#define pll pair<long long,long long>
#define pdd pair<long double,long double>
#define vll vector<ll>
#define rep(i,j,n) for(int i=j;i<n;i++)
#define mp make_pair
#define pb push_back
#define pf push_front
#define inf 1e17
#define N 100010
priority_queue<pll,vector<pll>,greater<pll> >pq;
priority_queue<ll,vector<ll>,greater<ll> >pq1;

ll result(ll a, ll b, ll p){
    ll ans=1;
    if(b==(-1))
        b=p-2;
    while(b){
        if(b&1){
            ans=(ans*a)%p;
        }
        a=(a*a)%p;
        b>>=1;
    }
    return ans;
}

ll T = 1,n,m,k;

int main(){
    if(fopen("input.txt", "r"))
    freopen("input.txt", "r", stdin),
    freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    cin >> T;
    while(T--){
        ll l;
        cin >> n >> l;
        ll a[n];
        for(int i=0;i<n;i++)
            cin >> a[i];

        double s1 = 1.0;
        double s2 = 1.0;
        double ans = 0;

        ll i=0, j=n-1;
        double pos1 = 0;
        double pos2 = l;

        while(i<=j){

            double p1 = (a[i] - pos1) / s1;
            double p2 = (pos2 - a[j]) / s2;
            if(p1 < p2){
                pos1 = a[i];
                i++;
                s1 = s1 + 1.0;
                pos2 = pos2 - (s2 * p1);
                ans = ans + p1;
            }
            else if(p1 > p2){
                pos2 = a[j];
                j--;
                s2 = s2 + 1.0;
                pos1 = pos1 + (s1 * p2);
                ans = ans + p2;
            }
            else{
                pos1 = pos1 + s1 * p1;
                i++;
                pos2 = pos2 - s2 * p2;
                j--;
                s1 = s1 + 1.0;
                s2 = s2 + 1.0;
                ans = ans + p1;
            }
            // cout << ans << " " << pos1 <<  " " << pos2 << "\n";
        }
        // cout << ans << " " << pos1 <<  " " << pos2 << "\n";
        {
            double d = pos2 - pos1;
            ans = ans + (d * 1.0) / (s1 + s2);
        }
        cout << ans << setprecision(16) << "\n";

    }

    return 0;
}


/*
lakshaygpt28
Lakshay Gupta
*/

#include <bits/stdc++.h>
using namespace std;

string to_string(char ch) {
    return "'" + string(1, ch) + "'";
}

string to_string(string s) {
    return '"' + s + '"';
}

string to_string(const char* s) {
    return to_string((string) s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

template <size_t N>
string to_string(bitset<N> v) {
    return v.to_string();
}

string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for (int i = 0; i < v.size(); ++i) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}

template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for (const auto &x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

void debug_out() { cout << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cout << " " << to_string(H);
    debug_out(T...);
}

#ifndef ONLINE_JUDGE
#define debug(...) cout << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

const double PI = acos(-1);
const long long LINF = LLONG_MAX;
const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10;

void test();
int n, l;
vector<int> a;
const double eps = 1e-8;
double t1(double x);
double t2(double x);

int main() {
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin >> t;
    cout << fixed;
    cout << setprecision(10);
    while (t--) {
        test();
    }
    return 0;
}

void test() {
    cin >> n >> l;
    a.resize(n + 2, 0);
    a[n + 1] = l;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double ans = 0;
    double low = 0, high = l, mid;
    while (eps < high - low) {
        mid = (low + high) / 2;
        double x = t1(mid);
        double y = t2(mid);
        // debug(mid, x, y);
        if (abs(x - y) < 1e-7) {
            cout << (x + y) / 2 << "\n";
            return;
        } else if (x > y) {
            high = mid - eps;
        } else {
            low = mid + eps;
        }
    }
    return;
}

double t1(double x) {
    int pre = 0, speed = 1;
    double ans = 0;
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] < x) {
            ans += double(a[i] - pre) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += (x - pre) / speed;
            break;
        }
    }
    return ans;
}
double t2(double x) {
    int pre = l, speed = 1;
    double ans = 0;
    for (int i = n; i >= 0; i--) {
        if (a[i] > x) {
            ans += double(pre - a[i]) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += double(pre - x) / speed;
            break;
        }
    }
    return ans;
}


/*
lakshaygpt28
Lakshay Gupta
*/

#include <bits/stdc++.h>
using namespace std;

const double PI = acos(-1);
const long long LINF = LLONG_MAX;
const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10;

void test();
int n, l;
vector<int> a;
const double eps = 1e-7;
double t1(double x);
double t2(double x);

int main() {
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin >> t;
    cout << fixed;
    cout << setprecision(10);
    while (t--) {
        test();
    }
    return 0;
}

void test() {
    cin >> n >> l;
    a.resize(n + 2, 0);
    a[n + 1] = l;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double ans = 0;
    double low = 0, high = l, mid;
    for (int it = 0; it <= 100; it++) {
        mid = (low + high) / 2;
        double x = t1(mid);
        double y = t2(mid);
        // debug(mid, x, y);
        if (x >= y) {
            high = mid;
        } else {
            low = mid;
        }
    }
    cout << t1(low) << "\n";
    return;
}

double t1(double x) {
    int pre = 0, speed = 1;
    double ans = 0;
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] < x) {
            ans += double(a[i] - pre) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += (x - pre) / speed;
            break;
        }
    }
    return ans;
}
double t2(double x) {
    int pre = l, speed = 1;
    double ans = 0;
    for (int i = n; i >= 0; i--) {
        if (a[i] > x) {
            ans += double(pre - a[i]) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += double(pre - x) / speed;
            break;
        }
    }
    return ans;
}


/*
lakshaygpt28
Lakshay Gupta
*/

#include <bits/stdc++.h>
using namespace std;

const double PI = acos(-1);
const long long LINF = LLONG_MAX;
const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10;

void test();
int n, l;
vector<int> a;
const double eps = 1e-7;
double t1(double x);
double t2(double x);

int main() {
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin >> t;
    cout << fixed;
    cout << setprecision(10);
    while (t--) {
        test();
    }
    return 0;
}

void test() {
    cin >> n >> l;
    a.resize(n + 2, 0);
    a[n + 1] = l;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double ans = 0;
    double low = 0, high = l, mid;
    while (abs(low - high) > eps) {
        mid = (low + high) / 2;
        double x = t1(mid);
        double y = t2(mid);
        // debug(mid, x, y);
        if (abs(x - y) < eps) {
            cout << x << "\n";
            return;
        } else if (x > y) {
            high = mid;
        } else {
            low = mid;
        }
    }
    return;
}

double t1(double x) {
    int pre = 0, speed = 1;
    double ans = 0;
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] < x) {
            ans += double(a[i] - pre) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += (x - pre) / speed;
            break;
        }
    }
    return ans;
}
double t2(double x) {
    int pre = l, speed = 1;
    double ans = 0;
    for (int i = n; i >= 0; i--) {
        if (a[i] > x) {
            ans += double(pre - a[i]) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += double(pre - x) / speed;
            break;
        }
    }
    return ans;
}


/*
lakshaygpt28
Lakshay Gupta
*/

#include <bits/stdc++.h>
using namespace std;

string to_string(char ch) {
    return "'" + string(1, ch) + "'";
}

string to_string(string s) {
    return '"' + s + '"';
}

string to_string(const char* s) {
    return to_string((string) s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

template <size_t N>
string to_string(bitset<N> v) {
    return v.to_string();
}

string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for (int i = 0; i < v.size(); ++i) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}

template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for (const auto &x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

void debug_out() { cout << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cout << " " << to_string(H);
    debug_out(T...);
}

#ifndef ONLINE_JUDGE
#define debug(...) cout << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

const double PI = acos(-1);
const long long LINF = LLONG_MAX;
const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10;

void test();
int n, l;
vector<int> a;
const double eps = 1e-9;
double t1(double x);
double t2(double x);

int main() {
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin >> t;
    cout << fixed;
    cout << setprecision(10);
    while (t--) {
        test();
    }
    return 0;
}

void test() {
    cin >> n >> l;
    a.resize(n + 2, 0);
    a[n + 1] = l;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double ans = 0;
    double low = 0, high = l, mid;
    while (low < high) {
        mid = (low + high) / 2;
        double x = t1(mid);
        double y = t2(mid);
        // debug(mid, x, y);
        if (abs(x - y) < eps) {
            cout << x << "\n";
            return;
        } else if (x > y) {
            high = mid - eps;
        } else {
            low = mid + eps;
        }
    }
    cout << "hi\n";
    return;
}

double t1(double x) {
    int pre = 0, speed = 1;
    double ans = 0;
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] < x) {
            ans += double(a[i] - pre) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += (x - pre) / speed;
            break;
        }
    }
    return ans;
}
double t2(double x) {
    int pre = l, speed = 1;
    double ans = 0;
    for (int i = n; i >= 0; i--) {
        if (a[i] > x) {
            ans += double(pre - a[i]) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += double(pre - x) / speed;
            break;
        }
    }
    return ans;
}


/*
lakshaygpt28
Lakshay Gupta
*/

#include <bits/stdc++.h>
using namespace std;

string to_string(char ch) {
    return "'" + string(1, ch) + "'";
}

string to_string(string s) {
    return '"' + s + '"';
}

string to_string(const char* s) {
    return to_string((string) s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

template <size_t N>
string to_string(bitset<N> v) {
    return v.to_string();
}

string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for (int i = 0; i < v.size(); ++i) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}

template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for (const auto &x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

void debug_out() { cout << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cout << " " << to_string(H);
    debug_out(T...);
}

#ifndef ONLINE_JUDGE
#define debug(...) cout << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

const double PI = acos(-1);
const long long LINF = LLONG_MAX;
const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10;

void test();
int n, l;
vector<int> a;
const double eps = 1e-8;
double t1(double x);
double t2(double x);

int main() {
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin >> t;
    cout << fixed;
    cout << setprecision(10);
    while (t--) {
        test();
    }
    return 0;
}

void test() {
    cin >> n >> l;
    a.resize(n + 2, 0);
    a[n + 1] = l;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double ans = 0;
    double low = 0, high = l, mid;
    while (low < high) {
        mid = (low + high) / 2;
        double x = t1(mid);
        double y = t2(mid);
        // debug(mid, x, y);
        if (abs(x - y) < eps) {
            cout << (x + y) / 2 << "\n";
            return;
        } else if (x > y) {
            high = mid - eps;
        } else {
            low = mid + eps;
        }
    }
    return;
}

double t1(double x) {
    int pre = 0, speed = 1;
    double ans = 0;
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] < x) {
            ans += double(a[i] - pre) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += (x - pre) / speed;
            break;
        }
    }
    return ans;
}
double t2(double x) {
    int pre = l, speed = 1;
    double ans = 0;
    for (int i = n; i >= 0; i--) {
        if (a[i] > x) {
            ans += double(pre - a[i]) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += double(pre - x) / speed;
            break;
        }
    }
    return ans;
}


/*
lakshaygpt28
Lakshay Gupta
*/

#include <bits/stdc++.h>
using namespace std;

const double PI = acos(-1);
const long long LINF = LLONG_MAX;
const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10;

void test();
int n, l;
vector<int> a;
const double eps = 1e-9;
double t1(double x);
double t2(double x);

int main() {
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin >> t;
    cout << fixed;
    cout << setprecision(10);
    while (t--) {
        test();
    }
    return 0;
}

void test() {
    cin >> n >> l;
    a.resize(n + 2, 0);
    a[n + 1] = l;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double ans = 0;
    double low = 0, high = l, mid;
    while (abs(low - high) > eps) {
        mid = (low + high) / 2;
        double x = t1(mid);
        double y = t2(mid);
        // debug(mid, x, y);
        if (abs(x - y) < eps) {
            cout << x << "\n";
            return;
        } else if (x > y) {
            high = mid;
        } else {
            low = mid;
        }
    }
    return;
}

double t1(double x) {
    int pre = 0, speed = 1;
    double ans = 0;
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] < x) {
            ans += double(a[i] - pre) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += (x - pre) / speed;
            break;
        }
    }
    return ans;
}
double t2(double x) {
    int pre = l, speed = 1;
    double ans = 0;
    for (int i = n; i >= 0; i--) {
        if (a[i] > x) {
            ans += double(pre - a[i]) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += double(pre - x) / speed;
            break;
        }
    }
    return ans;
}


/*
lakshaygpt28
Lakshay Gupta
*/

#include <bits/stdc++.h>
using namespace std;

string to_string(char ch) {
    return "'" + string(1, ch) + "'";
}

string to_string(string s) {
    return '"' + s + '"';
}

string to_string(const char* s) {
    return to_string((string) s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

template <size_t N>
string to_string(bitset<N> v) {
    return v.to_string();
}

string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for (int i = 0; i < v.size(); ++i) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}

template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for (const auto &x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

void debug_out() { cout << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cout << " " << to_string(H);
    debug_out(T...);
}

#ifndef ONLINE_JUDGE
#define debug(...) cout << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

const double PI = acos(-1);
const long long LINF = LLONG_MAX;
const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10;

void test();
int n, l;
vector<int> a;
const double eps = 1e-7;
double t1(double x);
double t2(double x);

int main() {
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin >> t;
    cout << fixed;
    cout << setprecision(10);
    while (t--) {
        test();
    }
    return 0;
}

void test() {
    cin >> n >> l;
    a.resize(n + 2, 0);
    a[n + 1] = l;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double ans = 0;
    double low = 0, high = l, mid;
    while (low < high) {
        mid = (low + high) / 2;
        double x = t1(mid);
        double y = t2(mid);
        // debug(mid, x, y);
        if (abs(x - y) < eps) {
            cout << x << "\n";
            return;
        } else if (x > y) {
            high = mid - eps;
        } else {
            low = mid + eps;
        }
    }
    return;
}

double t1(double x) {
    int pre = 0, speed = 1;
    double ans = 0;
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] < x) {
            ans += double(a[i] - pre) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += (x - pre) / speed;
            break;
        }
    }
    return ans;
}
double t2(double x) {
    int pre = l, speed = 1;
    double ans = 0;
    for (int i = n; i >= 0; i--) {
        if (a[i] > x) {
            ans += double(pre - a[i]) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += double(pre - x) / speed;
            break;
        }
    }
    return ans;
}


/*
lakshaygpt28
Lakshay Gupta
*/

#include <bits/stdc++.h>
using namespace std;

string to_string(char ch) {
    return "'" + string(1, ch) + "'";
}

string to_string(string s) {
    return '"' + s + '"';
}

string to_string(const char* s) {
    return to_string((string) s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

template <size_t N>
string to_string(bitset<N> v) {
    return v.to_string();
}

string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for (int i = 0; i < v.size(); ++i) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}

template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for (const auto &x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

void debug_out() { cout << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cout << " " << to_string(H);
    debug_out(T...);
}

#ifndef ONLINE_JUDGE
#define debug(...) cout << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

const double PI = acos(-1);
const long long LINF = LLONG_MAX;
const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10;

void test();
int n, l;
vector<int> a;
const double eps = 1e-9;
double t1(double x);
double t2(double x);

int main() {
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    int t;
    cin >> t;
    cout << fixed;
    cout << setprecision(10);
    while (t--) {
        test();
    }
    return 0;
}

void test() {
    cin >> n >> l;
    a.resize(n + 2, 0);
    a[n + 1] = l;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    double ans = 0;
    double low = 0, high = l, mid;
    while (low < high) {
        mid = (low + high) / 2;
        double x = t1(mid);
        double y = t2(mid);
        // debug(mid, x, y);
        if (abs(x - y) < eps) {
            cout << x << "\n";
            return;
        } else if (x > y) {
            high = mid;
        } else {
            low = mid;
        }
    }
    return;
}

double t1(double x) {
    int pre = 0, speed = 1;
    double ans = 0;
    for (int i = 1; i <= n + 1; i++) {
        if (a[i] < x) {
            ans += double(a[i] - pre) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += (x - pre) / speed;
            break;
        }
    }
    return ans;
}
double t2(double x) {
    int pre = l, speed = 1;
    double ans = 0;
    for (int i = n; i >= 0; i--) {
        if (a[i] > x) {
            ans += double(pre - a[i]) / speed;
            pre = a[i];
            speed++;
        } else {
            ans += double(pre - x) / speed;
            break;
        }
    }
    return ans;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int t;
    cin>>t;
    for(int i=0;i<t;i++){
        long long int l;
        int n;
        cin>>n>>l;
        vector<long double> X(n);
        for(int j=0;j<n;j++){
            cin>>X[j];
        }
        vector<long double> a1(n+2);
        vector<long double> a2(n+2);
        a1[1]=X[0];
        double speed=2;
        if(n>1){
        for(int j=2;j<n+1;j++){
            a1[j]=a1[j-1]+(X[j-1]-X[j-2])/speed;
            speed++;
        }}
        a1[n+1]=a1[n]+(l-X[n-1])/speed;
        speed=2;
        a2[n]=(l-X[n-1]);
        if(n>1){
        for(int j=n-1;j>0;j--){
            a2[j]=a2[j+1]+(X[j]-X[j-1])/speed;
            speed++;
        }
        }
        a2[0]=a2[1]+X[0]/speed;
        int k=0;
        for(int j=0;j<n+2;j++){
            if(a1[j]>=a2[j]){
                k=j;
                break;
            }
        }
        if(k==n+1){
            cout<<a1[n]+(double)((l-a1[n]-X[n-1])/(n+2))<<"\n";
        }

        else if(a1[k]==a2[k]){
            cout<<a1[k]<<"\n";
        }
        else{
            cout<<setprecision(6);
        cout<<(a1[k-1]+(double)((X[k-1]-X[k-2])/(n+2)))<<"\n";
        }
    }
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int t;
    cin>>t;
    for(int i=0;i<t;i++){
        long double l;
        double n;
        cin>>n>>l;
        vector<long double> X(n);
        for(long long int j=0;j<n;j++){
            cin>>X[j];
        }
        vector<long double> a1(n+1);
        vector<long double> a2(n+1);
        a1[0]=X[0];
        double speed=2;
        for(int j=1;j<n;j++){
            a1[j]=a1[j-1]+(X[j]-X[j-1])/speed;
            speed++;
        }
        a1[n]=a1[n-1]+(l-X[n-1])/speed;
        speed=2;
        a2[n]=(l-X[n-1]);
        for(int j=n-1;j>0;j--){
            a2[j]=a2[j+1]+(X[j]-X[j-1])/speed;
            speed++;
        }
        a2[0]=a2[1]+X[0]/speed;
        int k=0;
        for(int i=0;i<n+1;i++){
            if(a1[i]>=a2[i]){
                k=i;
                break;
            }
        }
        if(a1[k]==a2[k]){
            cout<<a1[k]<<"\n";
            continue;
        }
        cout<<(X[k]-X[k-1])/n+2<<"\n";
    }
}


#include<bits/stdc++.h>
using namespace std;

int main(){
    int t;
    cin>>t;
    for(int i=0;i<t;i++){
        long long int n,l;
        cin>>n>>l;
        vector<long double> X(n);
        for(long long int j=0;j<n;j++){
            cin>>X[j];
        }
        vector<long double> a1(n+1);
        vector<long double> a2(n+1);
        a1[0]=X[0];
        int speed=2;
        for(int j=1;j<n;j++){
            a1[j]=a1[j-1]+(X[j]=X[j-1])/speed;
            speed++;
        }
        a1[n]=a1[n+1]+(l-X[n-1])/speed;
        speed=2;
        a2[n]=(l-X[n-1]);
        for(int j=n-1;j>0;j--){
            a2[j]=a2[j+1]+(x[j]-X[j-1])/speed;
            speed++;
        }
        a2[0]=a2[1]+X[0]/speed;
        int k=0;
        for(int i=0;i<n+1;i++){
            if(a1[i]>=a2[i]){
                k=i;
                break;
            }
        }
        if(a1[k]==a2[k]){
            cout<<a1[k]<<"\n";
            continue;
        }
        cout<<(X[k]-X[k-1])/n+2<<"\n";
    }
}


#include<bits/stdc++.h>
#define ll long long
#define eps 1e-6
using namespace std;
int a[100007];
int n,k;
int judge(double t){
	double v1=1,s1=0,t1=t;
	for(int i=1;i<=n;++i){
		if(s1>=k)	return 1;
        double temp = (a[i] - s1) / v1;
		if(t1>=temp){
			t1-=temp;v1++;s1=a[i];
		}
		else{
			s1+=(v1*t1);
			break;
		}
	}
	double v2=1,s2=k,t2=t;
	for(int i=n;i>=1;--i){
		if(s2<=s1)	return 1;
        double temp = (s2 - a[i]) / v2;
		if(t2>=temp){
			v2++;s2=a[i];t2-=temp;
		}
		else{
			s2-=(v2*t2);
			break;
		}
	}
	return s2 <= s1;
}
int main(){
	int t;scanf("%d",&t);
	while(t--){
		scanf("%d%d",&n,&k);
		for(int i=1;i<=n;++i)	scanf("%d",&a[i]);
		double l=0,r=1e10;
		while(r-l>eps){
			double mid =(l+r)/2;
			if(judge(mid))	r=mid;
			else	l=mid;
		}
		printf("%.8lf\n",l);
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define eps 1e-6
using namespace std;
const int N = 1E5 + 10;
int a[N];
int n, k;
int judge(double t){
	double v1=1,s1=0,t1=t;
	for(int i=1;i<=n;++i){
		if(s1>=k)	return 1;
        double temp = (a[i] - s1) / v1;
		if(t1>=temp){
			t1-=temp;v1++;s1=a[i];
		}
		else{
			s1+=(v1*t1);
			break;
		}
	}
	double v2=1,s2=k,t2=t;
	for(int i=n;i>=1;--i){
		if(s2<=s1)	return 1;
        double temp = (s2 - a[i]) / v2;
		if(t2>=temp){
			v2++;s2=a[i];t2-=temp;
		}
		else{
			s2-=(v2*t2);
			break;
		}
	}
	return s2 <= s1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &k);
        for(int i=1;i<=n;++i) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) { //二分精度最高到1E-7可以AC, 设置到1E-8样例会超时
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
        printf("%.8f\n", l);
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define eps 1e-6
using namespace std;
const int N = 1E5 + 10;
int a[N];
int n, k;
int judge(double t){
	double v1=1,s1=0,t1=t;
	for(int i=1;i<=n;++i){
		if(s1>=k)	return 1;
        double temp = (a[i] - s1) / v1;
		if(t1>=temp){
			t1-=temp;v1++;s1=a[i];
		}
		else{
			break;
		}
	}
	s1+=(v1*t1);
	double v2=1,s2=k,t2=t;
	for(int i=n;i>=1;--i){
		if(s2<=s1)	return 1;
        double temp = (s2 - a[i]) / v2;
		if(t2>=temp){
			v2++;s2=a[i];t2-=temp;
		}
		else{
			break;
		}
	}
	s2-=(v2*t2);
	return s2 <= s1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &k);
        for(int i=1;i<=n;++i) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) {
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
        printf("%.8f\n", l);
    }
    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define eps 1e-6
using namespace std;
const int N = 1E5 + 10;
int a[N];
int n, k;
int judge(double t){
	double v1=1,s1=0,t1=t;
	for(int i=1;i<=n;++i){
		if(s1>=k)	return 1;
        double temp = (a[i] - s1) / v1;
		if(t1>=temp){
			t1-=temp;v1++;s1=a[i];
		}
		else{
			s1+=(v1*t1);
			break;
		}
	}
	double v2=1,s2=k,t2=t;
	for(int i=n;i>=1;--i){
		if(s2<=s1)	return 1;
        double temp = (s2 - a[i]) / v2;
		if(t2>=temp){
			v2++;s2=a[i];t2-=temp;
		}
		else{
			s2-=(v2*t2);
			break;
		}
	}
	return s2 <= s1;
}
int main(){
	int t;scanf("%d",&t);
	while(t--){
		scanf("%d%d",&n,&k);
		for(int i=1;i<=n;++i)	scanf("%d",&a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) { //二分精度最高到1E-7可以AC, 设置到1E-8样例会超时
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
		printf("%.8lf\n",l);
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define eps 1e-6
using namespace std;
const int N = 1E5 + 10;
int a[N];
int n, m;
int judge(double t){
	double v1=1,s1=0,t1=t;
	for(int i=1;i<=n;++i){
		if(s1>=k)	return 1;
        double temp = (a[i] - s1) / v1;
		if(t1>=temp){
			t1-=temp;v1++;s1=a[i];
		}
		else{
			s1+=(v1*t1);
			break;
		}
	}
	double v2=1,s2=k,t2=t;
	for(int i=n;i>=1;--i){
		if(s2<=s1)	return 1;
        double temp = (s2 - a[i]) / v2;
		if(t2>=temp){
			v2++;s2=a[i];t2-=temp;
		}
		else{
			s2-=(v2*t2);
			break;
		}
	}
	return s2 <= s1;
}
int main(){
	int t;scanf("%d",&t);
	while(t--){
		scanf("%d%d",&n,&k);
		for(int i=1;i<=n;++i)	scanf("%d",&a[i]);
		double l=0,r=1e10;
		while(r-l>eps){
			double mid =(l+r)/2;
			if(judge(mid))	r=mid;
			else	l=mid;
		}
		printf("%.8lf\n",l);
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define eps 1e-6
using namespace std;
const int N = 1E5 + 10;
int a[N];
int n, k;
int judge(double t){
	double v1=1,s1=0,t1=t;
	for(int i=1;i<=n;++i){
		if(s1>=k)	return 1;
        double temp = (a[i] - s1) / v1;
		if(t1>=temp){
			t1-=temp;v1++;s1=a[i];
		}
		else{
			s1+=(v1*t1);
			break;
		}
	}
	double v2=1,s2=k,t2=t;
	for(int i=n;i>=1;--i){
		if(s2<=s1)	return 1;
        double temp = (s2 - a[i]) / v2;
		if(t2>=temp){
			v2++;s2=a[i];t2-=temp;
		}
		else{
			s2-=(v2*t2);
			break;
		}
	}
	return s2 <= s1;
}
int main(){
	int t;scanf("%d",&t);
	while(t--){
		scanf("%d%d",&n,&k);
		for(int i=1;i<=n;++i)	scanf("%d",&a[i]);
		double l=0,r=1e10;
		while(r-l>eps){
			double mid =(l+r)/2;
			if(judge(mid))	r=mid;
			else	l=mid;
		}
		printf("%.8lf\n",l);
	}
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define eps 1e-6
using namespace std;
int a[100007];
int n,k;
int judge(double t){
	double v1=1,s1=0,t1=t;
	for(int i=1;i<=n;++i){
		if(s1>=k)	return 1;
        double temp = (a[i] - s1) / v1;
		if(t1>=temp){
			t1-=temp;v1++;s1=a[i];
		}
		else{
			s1+=(v1*t1);
			break;
		}
	}
	double v2=1,s2=k,t2=t;
	for(int i=n;i>=1;--i){
		if(s2<=s1)	return 1;
        double temp = (s2 - a[i]) / v2;
		if(t2>=temp){
			v2++;s2=a[i];t2-=temp;
		}
		else{
			s2-=(v2*t2);
			break;
		}
	}
	return s2 <= s1;
}
int main(){
	int t;scanf("%d",&t);
	while(t--){
		scanf("%d%d",&n,&k);
		for(int i=1;i<=n;++i)	scanf("%d",&a[i]);
		double l=0,r=1e9;
		while(r-l>eps){
			double mid =(l+r)/2;
			if(judge(mid))	r=mid;
			else	l=mid;
		}
		printf("%.8lf\n",l);
	}
	return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const int N = 1E5 + 10;
int a[N];
int n, m;
bool judge(double t) {
    int s1 = 1; double t1 = t, index1 = 0;
    for (int i = 1; i <= n; ++i) {
        if (index1 >= m) return 1;
        double temp = (a[i] - index1) / s1; //跑到下个点需要的时间
        if (t1 >= temp) t1 -= temp, index1 = a[i], s1++;
        else break;
    }
    index1 += t1 * s1;

    int s2 = 1; double t2 = t, index2 = m;
    for (int i = n; i >= 1; --i) {
        if (index2 <= index1) return 1;
        double temp = (index2 - a[i]) / s2;
        if (t2 >= temp) t2 -= temp, s2++, index2 = a[i];
        else break;
    }
    index2 -= t2 * s2;

    return index2 <= index1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &m);
        rep(i, n) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) { //二分精度最高到1E-7可以AC, 设置到1E-8样例会超时
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
        printf("%.8f\n", l);
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int factorial(int n)
{
    return ((n*(n+1))/2);
}

int main()
{
    int k;
    cin>>k;
    for(int z=0;z<k;z++)
    {
        long long int n,k;
        cin>>n>>k;
        long long int a[n];
        double pos1=0,pos2=k,p1,p2;
        double t=0,tt;
        double s1=1,s2=1,ps1,ps2;

        for(long long int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        for(long long int i=0,j=n-1;pos1<pos2;i++,j--)
        {
            double tt1,tt2;
            if(i<n && j>=0)
            {
                tt1=(double(a[i])-pos1)/s1;
                tt2=(pos2-double(a[j]))/s2;
                p1=pos1;
                p2=pos2;
                ps1=s1;
                ps2=s2;
                tt=min(tt1,tt2);
                pos1=(pos1+tt*s1);
                pos2=(pos2-tt*s2);

                t+=tt;
                if(a[i]-(pos1)==0)
                {
                    s1++;
                }
                else
                    i--;
                if((pos2)-a[j]==0)
                {
                    s2++;
                }
                else
                    j++;

            }
            else
                break;
        }

        if(pos1==pos2)
        {
            cout.precision(17);
            cout<<t<<endl;
        }

        else if(pos1>pos2)
        {
            t=t-tt+(((p2)-(p1))/(ps1+ps2));
            cout.precision(17);
            cout<<t<<endl;
        }
        else
        {
            t=t+((pos2-pos1)/(s1+s2));
            cout.precision(17);
            cout<<t<<endl;
        }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int factorial(int n)
{
    return ((n*(n+1))/2);
}

int main()
{
    int k;
    cin>>k;
    for(int z=0;z<k;z++)
    {
        long long int n,k;
        cin>>n>>k;
        long long int a[n];
        double pos1=0,pos2=k,p1,p2;
        double t=0,tt;
        double s1=1,s2=1,ps1,ps2;

        for(long long int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        for(long long int i=0,j=n-1;pos1<pos2;i++,j--)
        {
            double tt1,tt2;
            if(i<n && j>=0)
            {
                tt1=double(a[i]-pos1)/s1;
                tt2=double(pos2-a[j])/s2;
                p1=pos1;
                p2=pos2;
                ps1=s1;
                ps2=s2;
                tt=min(tt1,tt2);
                pos1=(pos1+tt*s1);
                pos2=(pos2-tt*s2);

                t+=tt;
                if(a[i]-(pos1)==0)
                {
                    s1++;
                }
                else
                    i--;
                if((pos2)-a[j]==0)
                {
                    s2++;
                }
                else
                    j++;

            }
            else
                break;
        }

        if(pos1==pos2)
            cout<<t<<endl;
        else if(pos1>pos2)
        {
            t=t-tt+(((p2)-(p1))/(ps1+ps2));
            cout<<t<<endl;
        }
        else
        {
            t=t+((pos2-pos1)/(s1+s2));
            cout<<t<<endl;
        }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int factorial(int n)
{
    return ((n*(n+1))/2);
}

int main()
{
    int k;
    cin>>k;
    for(int z=0;z<k;z++)
    {
        long long int n,k;
        cin>>n>>k;
        long long int a[n];
        long long int pos1=0,pos2=k,p1,p2;
        float t=0,tt;
        float s1=1,s2=1,ps1,ps2;

        for(long long int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        for(long long int i=0,j=n-1;pos1<pos2;i++,j--)
        {
            float tt1,tt2;
            if(i<n && j>=0)
            {
                tt1=float(a[i]-pos1)/s1;
                tt2=float(pos2-a[j])/s2;
                p1=pos1;
                p2=pos2;
                ps1=s1;
                ps2=s2;
                tt=min(tt1,tt2);
                pos1=(pos1+tt*s1);
                pos2=(pos2-tt*s2);
                if(a[i]-(pos1+tt*s1)==0)
                {
                    s1++;
                }
                else
                    i--;
                if((pos2-tt*s2)-a[j]==0)
                {
                    s2++;
                }
                else
                    j++;

                t+=tt;

            }
            else
                break;
        }

        if(pos1==pos2)
            cout<<t<<endl;
        else if(pos1>pos2)
        {
            t=t-tt+(((p2)-(p1))/(ps1+ps2));
            cout<<t<<endl;
        }
        else
        {
            t=t+((pos2-pos1)/(s1+s2));
            cout<<t<<endl;
        }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int factorial(int n)
{
    return ((n*(n+1))/2);
}

int main()
{
    int k;
    cin>>k;
    for(int z=0;z<k;z++)
    {
        long long int n,k;
        cin>>n>>k;
        long long int a[n];
        double pos1=0,pos2=k,p1,p2;
        double t=0,tt;
        double s1=1,s2=1,ps1,ps2;

        for(long long int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        for(long long int i=0,j=n-1;pos1<pos2;i++,j--)
        {
            double tt1,tt2;
            if(i<n && j>=0)
            {
                tt1=double(a[i]-pos1)/s1;
                tt2=double(pos2-a[j])/s2;
                p1=pos1;
                p2=pos2;
                ps1=s1;
                ps2=s2;
                tt=min(tt1,tt2);
                pos1=(pos1+tt*s1);
                pos2=(pos2-tt*s2);

                t+=tt;
                if(a[i]-(pos1)==0)
                {
                    s1++;
                }
                else
                    i--;
                if((pos2)-a[j]==0)
                {
                    s2++;
                }
                else
                    j++;

                cout<<"p1="<<p1<<"\tpos1="<<pos1<<"\tps1="<<ps1<<"\ts1="<<s1<<endl;
                cout<<"p2="<<p2<<"\tpos2="<<pos2<<"\tps2="<<ps2<<"\ts2="<<s2<<endl;

            }
            else
                break;
        }

        if(pos1==pos2)
            cout<<t<<endl;
        else if(pos1>pos2)
        {
            t=t-tt+(((p2)-(p1))/(ps1+ps2));
            cout<<t<<endl;
        }
        else
        {
            t=t+((pos2-pos1)/(s1+s2));
            cout<<t<<endl;
        }

    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
int factorial(int n)
{
    return ((n*(n+1))/2);
}

int main()
{
    int k;
    cin>>k;
    for(int z=0;z<k;z++)
    {
        long long int n,k;
        cin>>n>>k;
        long long int a[n];
        double pos1=0,pos2=k,p1,p2;
        double t=0,tt;
        double s1=1,s2=1,ps1,ps2;

        for(long long int i=0;i<n;i++)
        {
            cin>>a[i];
        }
        for(long long int i=0,j=n-1;pos1<pos2;i++,j--)
        {
            double tt1,tt2;
            if(i<n && j>=0)
            {
                tt1=(double(a[i])-pos1)/s1;
                tt2=(pos2-double(a[j]))/s2;
                p1=pos1;
                p2=pos2;
                ps1=s1;
                ps2=s2;
                tt=min(tt1,tt2);
                pos1=(pos1+tt*s1);
                pos2=(pos2-tt*s2);

                t+=tt;
                if(a[i]-(pos1)==0)
                {
                    s1++;
                }
                else
                    i--;
                if((pos2)-a[j]==0)
                {
                    s2++;
                }
                else
                    j++;

            }
            else
                break;
        }

        if(pos1==pos2)
            cout<<t<<endl;
        else if(pos1>pos2)
        {
            t=t-tt+(((p2)-(p1))/(ps1+ps2));
            cout<<t<<endl;
        }
        else
        {
            t=t+((pos2-pos1)/(s1+s2));
            cout<<t<<endl;
        }

    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<stack>
#include<queue>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<math.h>
#include<tuple>
#include<string.h>
#include <numeric>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define pp(...) "\033[94m [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define pp1(...) "\033[1;47;35m" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define dg(x) debug() << pp1(x)
#define dg1(x) debug() << "[line : " << __LINE__ <<"]"<< pp(x)
#define dg2(x,y) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y)
#define dg3(x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y) pp(z)
#define dg4(w,x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(w) pp(x) pp(y) pp(z)
template<typename T> void db(T x ){ debug() <<">>> " <<  x; }
template<typename T> void db(T x , T y){ debug() <<">>> " <<  x <<" , "<< y; }
template<typename T> void db(T x , T y , T z){ debug() <<">>> "<< x <<" , "<< y <<" , "<< z; }
template<typename T> void db(T x , T y , T z , T a){ debug() <<">>> "<< x <<" , " << y <<" , "<< z <<" , "<< a; }
#define int long long
#define all(x) x.begin() , x.end()
#define clr(x , y) memset(x , y , sizeof x);
#define sz(x) (int)x.size()

const int Mod = 1e9 + 7;
const int inf = 1e18;
const int xx = 1e6;
vector<long double> l , r;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while(t--) {
    int n, L;
    cin >> n >> L;
    vector<int> a;
    a.push_back(0);
    for(int i = 1;i <= n; i++) {
       int x;
       cin >> x;
       a.push_back(x);
    }
    a.push_back(L);
    dg1(a);
    l = r = vector<long double>(n + 3, 0.0);
    int v = 1 ;
    long double pre = 0;
    for(int i = 1; i <= n + 1; i++) {
      long double _tn = pre + (long double)(a[i] - a[i - 1]) / (long double) v;
      l[ i ] = _tn;
      // dg1(_tn);
      pre = _tn;
      v++;
    }
    v = 1;
    pre = 0;
    for(int i = n; i >= 0; i--) {
      long double _tn = pre + (long double)(a[i + 1] - a[i])/(long double) v;
      r[ i ] = _tn;
      // dg1(_tn);
      pre = _tn;
      v++;
    }
    dg1(l);
    dg1(r);
    auto cal_l = [&](int time) {
      if(time >= l[n + 1]) return (long double)L;
      for(int i = 1; i <= n + 1; i++) {
        if(l[ i ] > time ) {
          // dg3(i, a[i-1] , l[i-1]);
          long double p = a[i - 1] + (time - l[i - 1]) * (i);
          return p;
        }
      }
      return (long double)L;
    };
    auto cal_r = [&](int time) {
      if(time >= r[0]) return (long double)0;
      for(int i = n; i >= 0; i--) {
        if(r[i] > time) {
          long double p = a[i + 1] - (time - r[i + 1]) * (n - i + 1);
          return p;
        }
      }
      return (long double)0;
    };
    // db(cal_l(1));
    // for(int i = 1; i <= 6; i++) {
    //   long double x = cal_r(i);
    //   dg2(i , x);
    // }

    int low = 1 , hi = 10000000000;
    int ans = 0;
    while(low <= hi) {
      int mid = (low + hi)/2;
      long double x1 = cal_l(mid);
      long double x2 = cal_r(mid);
      // dg3(mid , x1, x2);
      if(x1  < x2) {
        ans = max(ans , mid);
        low = mid + 1;
      }
      else hi = mid - 1;
    }
    long double dx1 = cal_l(ans);
    long double dx2 = cal_r(ans);
    dg2(dx1 , dx2);
    dg1(ans);
    int velocity = 0;
    for(int i = 1; i <= n + 1; i++) {
      if(l[i] > ans) {
        velocity += i;break;
      }
    }

    for(int i = n; i>= 0; i--) {
      if(r[i] > ans) {
        velocity += (n - i + 1);
        break;
      }
    }
    dg1(velocity);
    long double res = (long double)ans + (long double)(dx2 - dx1) / (long double)(velocity);
    cout << fixed << setprecision(17) << res << '\n';
  }
}


#include<iostream>
#include<cstdio>
#include<stack>
#include<queue>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<math.h>
#include<tuple>
#include<string.h>
#include <numeric>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define pp(...) "\033[94m [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define pp1(...) "\033[1;47;35m" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define dg(x) debug() << pp1(x)
#define dg1(x) debug() << "[line : " << __LINE__ <<"]"<< pp(x)
#define dg2(x,y) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y)
#define dg3(x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y) pp(z)
#define dg4(w,x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(w) pp(x) pp(y) pp(z)
template<typename T> void db(T x ){ debug() <<">>> " <<  x; }
template<typename T> void db(T x , T y){ debug() <<">>> " <<  x <<" , "<< y; }
template<typename T> void db(T x , T y , T z){ debug() <<">>> "<< x <<" , "<< y <<" , "<< z; }
template<typename T> void db(T x , T y , T z , T a){ debug() <<">>> "<< x <<" , " << y <<" , "<< z <<" , "<< a; }
#define int long long
#define all(x) x.begin() , x.end()
#define clr(x , y) memset(x , y , sizeof x);
#define sz(x) (int)x.size()

const int Mod = 1e9 + 7;
const int inf = 1e18;

signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while(t--) {
  int n , l;
  cin >> n >> l;
  vector<double> a(n+2), b(n + 2);
  a[n + 1] = (double)l;
  for(int i = 1;i <= n; i++) {
    cin >> a[i];
  }
  for(int i = 0; i <= n + 1; i++) {
    b[i] = l - a[i];
  }
  reverse(all(b));
  auto cal = [&](vector<double> &d , double ts) -> double {
     for(int i = 1; i < d.size(); i++) {
       double tm = (d[i] - d[i - 1]) / i;
       if(ts > tm) {
         ts -= tm;
       } else {
         return d[i - 1] + ts * i;
       }
     }
     return d.back();
  };

   double lo = 0 , hi = l , mid;
   while(lo + 1e-6 < hi) {
      mid = (lo + hi) / 2.0;
      double tot = cal(a , mid) + cal(b , mid);
      if(tot < l) {
        lo = mid;
      } else {
        hi = mid;
      }
   }
   cout << fixed << setprecision(10) << mid << '\n';

  }

}


#include<iostream>
#include<cstdio>
#include<stack>
#include<queue>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<math.h>
#include<tuple>
#include<string.h>
#include <numeric>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define pp(...) "\033[94m [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define pp1(...) "\033[1;47;35m" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define dg(x) debug() << pp1(x)
#define dg1(x) debug() << "[line : " << __LINE__ <<"]"<< pp(x)
#define dg2(x,y) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y)
#define dg3(x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y) pp(z)
#define dg4(w,x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(w) pp(x) pp(y) pp(z)
template<typename T> void db(T x ){ debug() <<">>> " <<  x; }
template<typename T> void db(T x , T y){ debug() <<">>> " <<  x <<" , "<< y; }
template<typename T> void db(T x , T y , T z){ debug() <<">>> "<< x <<" , "<< y <<" , "<< z; }
template<typename T> void db(T x , T y , T z , T a){ debug() <<">>> "<< x <<" , " << y <<" , "<< z <<" , "<< a; }
#define int long long
#define all(x) x.begin() , x.end()
#define clr(x , y) memset(x , y , sizeof x);
#define sz(x) (int)x.size()

const int Mod = 1e9 + 7;
const int inf = 1e18;
const int xx = 1e6;
vector<long double> l , r;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while(t--) {
    int n, L;
    cin >> n >> L;
    vector<int> a;
    a.push_back(0);
    for(int i = 1;i <= n; i++) {
       int x;
       cin >> x;
       a.push_back(x);
    }
    a.push_back(L);
    dg1(a);
    l = r = vector<long double>(n + 3, 0.0);
    int v = 1 ;
    long double pre = 0;
    for(int i = 1; i <= n + 1; i++) {
      long double _tn = pre + (long double)(a[i] - a[i - 1]) / (long double) v;
      l[ i ] = _tn;
      // dg1(_tn);
      pre = _tn;
      v++;
    }
    v = 1;
    pre = 0;
    for(int i = n; i >= 0; i--) {
      long double _tn = pre + (long double)(a[i + 1] - a[i])/(long double) v;
      r[ i ] = _tn;
      // dg1(_tn);
      pre = _tn;
      v++;
    }
    dg1(l);
    dg1(r);
    auto cal_l = [&](int time) {
      if(time >= l[n + 1]) return (long double)L;
      for(int i = 1; i <= n + 1; i++) {
        if(l[ i ] > time ) {
          // dg3(i, a[i-1] , l[i-1]);
          long double p =(long double) a[i - 1] + ((long double)time - l[i - 1]) * (long double)(i);
          return p;
        }
      }
      return (long double)L;
    };
    auto cal_r = [&](int time) {
      if(time >= r[0]) return (long double)0;
      for(int i = n; i >= 0; i--) {
        if(r[i] > time) {
          long double p = (long double)a[i + 1] - ((long double) time - r[i + 1]) *(long double) (n - i + 1);
          return p;
        }
      }
      return (long double)0;
    };
    // db(cal_l(1));
    // for(int i = 1; i <= 6; i++) {
    //   long double x = cal_r(i);
    //   dg2(i , x);
    // }

    int low = 1 , hi = 10000000000;
    int ans = 0;
    while(low <= hi) {
      int mid = (low + hi)/2;
      long double x1 = cal_l(mid);
      long double x2 = cal_r(mid);
      // dg3(mid , x1, x2);
      if(x1  <= x2) {
        ans = max(ans , mid);
        low = mid + 1;
      }
      else hi = mid - 1;
    }
    long double dx1 = cal_l(ans);
    long double dx2 = cal_r(ans);
    dg2(dx1 , dx2);
    dg1(ans);
    int velocity = 0;
    for(int i = 1; i <= n + 1; i++) {
      if(l[i] > ans) {
        velocity += i;break;
      }
    }

    for(int i = n; i>= 0; i--) {
      if(r[i] > ans) {
        velocity += (n - i + 1);
        break;
      }
    }
    dg1(velocity);
    long double res = (long double)ans + (long double)(dx2 - dx1) / (long double)(velocity);
    cout << fixed << setprecision(17) << res << '\n';
  }
}


#include<iostream>
#include<cstdio>
#include<stack>
#include<queue>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<math.h>
#include<tuple>
#include<string.h>
#include <numeric>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define pp(...) "\033[94m [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define pp1(...) "\033[1;47;35m" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define dg(x) debug() << pp1(x)
#define dg1(x) debug() << "[line : " << __LINE__ <<"]"<< pp(x)
#define dg2(x,y) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y)
#define dg3(x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y) pp(z)
#define dg4(w,x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(w) pp(x) pp(y) pp(z)
template<typename T> void db(T x ){ debug() <<">>> " <<  x; }
template<typename T> void db(T x , T y){ debug() <<">>> " <<  x <<" , "<< y; }
template<typename T> void db(T x , T y , T z){ debug() <<">>> "<< x <<" , "<< y <<" , "<< z; }
template<typename T> void db(T x , T y , T z , T a){ debug() <<">>> "<< x <<" , " << y <<" , "<< z <<" , "<< a; }
#define int long long
#define all(x) x.begin() , x.end()
#define clr(x , y) memset(x , y , sizeof x);
#define sz(x) (int)x.size()

const int Mod = 1e9 + 7;
const int inf = 1e18;
const int xx = 1e6;
vector<long double> l , r;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while(t--) {
    int n, L;
    cin >> n >> L;
    vector<int> a;
    a.push_back(0);
    for(int i = 1;i <= n; i++) {
       int x;
       cin >> x;
       a.push_back(x);
    }
    a.push_back(L);
    dg1(a);
    l = r = vector<long double>(n + 3, 0.0);
    int v = 1 ;
    long double pre = 0;
    for(int i = 1; i <= n + 1; i++) {
      long double _tn = pre + (long double)(a[i] - a[i - 1]) / (long double) v;
      l[ i ] = _tn;
      // dg1(_tn);
      pre = _tn;
      v++;
    }
    v = 1;
    pre = 0;
    for(int i = n; i >= 0; i--) {
      long double _tn = pre + (long double)(a[i + 1] - a[i])/(long double) v;
      r[ i ] = _tn;
      // dg1(_tn);
      pre = _tn;
      v++;
    }
    dg1(l);
    dg1(r);
    auto cal_l = [&](int time) {
      if(time >= l[n + 1]) return (long double)L;
      for(int i = 1; i <= n + 1; i++) {
        if(l[ i ] > time ) {
          // dg3(i, a[i-1] , l[i-1]);
          long double p =(long double) a[i - 1] + ((long double)time - l[i - 1]) * (long double)(i);
          return p;
        }
      }
      return (long double)L;
    };
    auto cal_r = [&](int time) {
      if(time >= r[0]) return (long double)0;
      for(int i = n; i >= 0; i--) {
        if(r[i] > time) {
          long double p = (long double)a[i + 1] - ((long double) time - r[i + 1]) *(long double) (n - i + 1);
          return p;
        }
      }
      return (long double)0;
    };
    // db(cal_l(1));
    // for(int i = 1; i <= 6; i++) {
    //   long double x = cal_r(i);
    //   dg2(i , x);
    // }

    int low = 0 , hi = 10000000000;
    int ans = 0;
    while(low <= hi) {
      int mid = (low + hi)/2;
      long double x1 = cal_l(mid);
      long double x2 = cal_r(mid);
      // dg3(mid , x1, x2);
      if(x1  <= x2) {
        ans = max(ans , mid);
        low = mid + 1;
      }
      else hi = mid - 1;
    }
    long double dx1 = cal_l(ans);
    long double dx2 = cal_r(ans);
    dg2(dx1 , dx2);
    dg1(ans);
    int velocity = 0;
    for(int i = 1; i <= n + 1; i++) {
      if(l[i] > ans) {
        velocity += i;break;
      }
    }

    for(int i = n; i>= 0; i--) {
      if(r[i] > ans) {
        velocity += (n - i + 1);
        break;
      }
    }
    dg1(velocity);
    long double res = (long double)ans + (long double)(dx2 - dx1) / (long double)(velocity);
    cout << fixed << setprecision(17) << res << '\n';
  }
}


#include<iostream>
#include<cstdio>
#include<stack>
#include<queue>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<math.h>
#include<tuple>
#include<string.h>
#include <numeric>
#include<unordered_map>
#include<bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define pp(...) "\033[94m [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define pp1(...) "\033[1;47;35m" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define dg(x) debug() << pp1(x)
#define dg1(x) debug() << "[line : " << __LINE__ <<"]"<< pp(x)
#define dg2(x,y) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y)
#define dg3(x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(x) pp(y) pp(z)
#define dg4(w,x,y,z) debug() << "[line : " << __LINE__ <<"]"<< pp(w) pp(x) pp(y) pp(z)
template<typename T> void db(T x ){ debug() <<">>> " <<  x; }
template<typename T> void db(T x , T y){ debug() <<">>> " <<  x <<" , "<< y; }
template<typename T> void db(T x , T y , T z){ debug() <<">>> "<< x <<" , "<< y <<" , "<< z; }
template<typename T> void db(T x , T y , T z , T a){ debug() <<">>> "<< x <<" , " << y <<" , "<< z <<" , "<< a; }
#define int long long
#define all(x) x.begin() , x.end()
#define clr(x , y) memset(x , y , sizeof x);
#define sz(x) (int)x.size()

const int Mod = 1e9 + 7;
const int inf = 1e18;
const int xx = 1e6;
vector<long double> l , r;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while(t--) {
    int n, L;
    cin >> n >> L;
    vector<int> a;
    a.push_back(0);
    for(int i = 1;i <= n; i++) {
       int x;
       cin >> x;
       a.push_back(x);
    }
    a.push_back(L);
    dg1(a);
    l = r = vector<long double>(n + 3, 0.0);
    int v = 1 ;
    long double pre = 0;
    for(int i = 1; i <= n + 1; i++) {
      long double _tn = pre + (long double)(a[i] - a[i - 1]) / (long double) v;
      l[ i ] = _tn;
      // dg1(_tn);
      pre = _tn;
      v++;
    }
    v = 1;
    pre = 0;
    for(int i = n; i >= 0; i--) {
      long double _tn = pre + (long double)(a[i + 1] - a[i])/(long double) v;
      r[ i ] = _tn;
      // dg1(_tn);
      pre = _tn;
      v++;
    }
    dg1(l);
    dg1(r);
    auto cal_l = [&](int time) {
      if(time >= l[n + 1]) return (long double)L;
      for(int i = 1; i <= n + 1; i++) {
        if(l[ i ] > time ) {
          // dg3(i, a[i-1] , l[i-1]);
          long double p = a[i - 1] + (time - l[i - 1]) * (i);
          return p;
        }
      }
      return (long double)L;
    };
    auto cal_r = [&](int time) {
      if(time >= r[0]) return (long double)0;
      for(int i = n; i >= 0; i--) {
        if(r[i] > time) {
          long double p = a[i + 1] - (time - r[i + 1]) * (n - i + 1);
          return p;
        }
      }
      return (long double)0;
    };
    // db(cal_l(1));
    // for(int i = 1; i <= 6; i++) {
    //   long double x = cal_r(i);
    //   dg2(i , x);
    // }

    int low = 1 , hi = 10000000000;
    int ans = 0;
    while(low <= hi) {
      int mid = (low + hi)/2;
      long double x1 = cal_l(mid);
      long double x2 = cal_r(mid);
      // dg3(mid , x1, x2);
      if(x1  <= x2) {
        ans = max(ans , mid);
        low = mid + 1;
      }
      else hi = mid - 1;
    }
    long double dx1 = cal_l(ans);
    long double dx2 = cal_r(ans);
    dg2(dx1 , dx2);
    dg1(ans);
    int velocity = 0;
    for(int i = 1; i <= n + 1; i++) {
      if(l[i] > ans) {
        velocity += i;break;
      }
    }

    for(int i = n; i>= 0; i--) {
      if(r[i] > ans) {
        velocity += (n - i + 1);
        break;
      }
    }
    dg1(velocity);
    long double res = (long double)ans + (long double)(dx2 - dx1) / (long double)(velocity);
    cout << fixed << setprecision(17) << res << '\n';
  }
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const int N = 1E5 + 10;
int a[N];
int n, m;
bool judge(double t) {
    int s1 = 1; double t1 = t, index1 = 0;
    for (int i = 1; i <= n; ++i) {
        double temp = (a[i] - index1) / s1;
        if (t1 >= temp) t1 -= temp, index1 = a[i], s1++;
        else break;
    }
    index1 += t1 * s1;

    int s2 = 1; double t2 = t, index2 = m;
    for (int i = n; i >= 1; --i) {
        if (index2 <= index1) return 1;
        double temp = (index2 - a[i]) / s2;
        if (t2 >= temp) t2 -= temp, s2++, index2 = a[i];
        else break;
    }
    index2 -= t2 * s2;

    return index2 <= index1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &m);
        rep(i, n) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) {
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
        printf("%.10f\n", l);
    }
    return 0;
}


#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+100;
typedef long long LL;
double a[maxn];
LL n,m;
bool check(double t)
{
    double dis1=0;double cost1=0;
    for(LL i=1;i<=n+1;i++){
        if(cost1+(a[i]-a[i-1])/i>=t)
        {
            dis1+=(t-cost1)*(i);break;
        }
        else{
            cost1+=(a[i]-a[i-1])/i;
            dis1=a[i];
        }
    }
    //pos--;
    double cost2=0;double dis2=0;
    for(LL i=n,k=1;i>=0;i--,k++)
    {
        if(cost2+(a[i+1]-a[i])/k>=t)
        {
            dis2+=(t-cost2)*(k) ;break;
        }
        else{
            cost2+=(a[i+1]-a[i])/(k);
            dis2=m-a[i];
        }
    }
    if(dis2+dis1>=m)
    {
        return true;
    }
    else return false;
}
int main(void)
{
    cin.tie(0);std::ios::sync_with_stdio(false);
    int t;cin>>t;
    while(t--)
    {
        cin>>n>>m;
        for(LL i=0;i<=n+10;i++) a[i]=0;
        for(LL i=1;i<=n;i++) cin>>a[i];
        a[0]=0;
        a[n+1]=m;
        double l=0;double r=1e18;
        while (r - l > 1E-6) {
            double mid=(l+r)/2;
            if(check(mid)) r=mid;
            else l=mid;
        }
        printf("%.9f\n",l);
    }
    return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const int N = 1E5 + 10;
int a[N];
int n, m;
bool judge(double t) {
    int s1 = 1; double t1 = t, index1 = 0;
    for (int i = 1; i <= n; ++i) {
        double temp = (a[i] - index1) / s1;
        if (t1 >= temp) t1 -= temp, index1 = a[i], s1++;
        else break;
    }
    index1 += t1 * s1;

    int s2 = 1; double t2 = t, index2 = m;
    for (int i = n; i >= 1; --i) {
        if (index2 <= index1) return 1;
        double temp = (index2 - a[i]) / s2;
        if (t2 >= temp) t2 -= temp, s2++, index2 = a[i];
        else break;
    }
    index2 -= t2 * s2;

    return index2 <= index1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &m);
        rep(i, n) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) {
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
        cout << l << endl;
    }
    return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const int N = 1E5 + 10;
int a[N];
int n, m;
bool judge(double t) {
    int s1 = 1; double t1 = t, index1 = 0;
    for (int i = 1; i <= n; ++i) {
        double temp = (a[i] - index1) / s1;
        if (t1 >= temp) t1 -= temp, index1 = a[i], s1++;
        else break;
    }
    index1 += t1 * s1;

    int s2 = 1; double t2 = t, index2 = m;
    for (int i = n; i >= 1; --i) {
        if (index2 <= index1) return 1;
        double temp = (index2 - a[i]) / s2;
        if (t2 >= temp) t2 -= temp, s2++, index2 = a[i];
        else break;
    }
    index2 -= t2 * s2;

    return index2 <= index1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &m);
        rep(i, n) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) {
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
        cout << fixed << l << endl;
    }
    return 0;
}


#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+100;
typedef long long LL;
LL a[maxn];
LL n,m;
bool check(double t)
{
    double dis1=0;double cost1=0;
    for(LL i=1;i<=n+1;i++){
        if(cost1+1.0*(a[i]-a[i-1])/i>=t)
        {
            dis1+=(t-cost1)*(i);break;
        }
        else{
            cost1+=1.0*(a[i]-a[i-1])/i;
            dis1=a[i];
        }
    }
    //pos--;
    double cost2=0;double dis2=0;
    for(LL i=n,k=1;i>=0;i--,k++)
    {
        if(cost2+1.0*(a[i+1]-a[i])/k>=t)
        {
            dis2+=(t-cost2)*(k) ;break;
        }
        else{
            cost2+=1.0*(a[i+1]-a[i])/(k);
            dis2=m-a[i];
        }
    }
    if(dis2+dis1>=m)
    {
        return true;
    }
    else return false;
}
int main(void)
{
    cin.tie(0);std::ios::sync_with_stdio(false);
    int t;cin>>t;
    while(t--)
    {
        cin>>n>>m;
        for(LL i=0;i<=n+10;i++) a[i]=0;
        for(LL i=1;i<=n;i++) cin>>a[i];
        a[0]=0;
        a[n+1]=m;
        double l=0;double r=1e18;
        while (r - l > 1E-6) {
            double mid=(l+r)/2;
            if(check(mid)) r=mid;
            else l=mid;
        }
        cout << l << endl;
    }
    return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const int N = 1E5 + 10;
int a[N];
int n, m;
bool judge(double t) {
    int s1 = 1; double t1 = t, index1 = 0;
    for (int i = 1; i <= n; ++i) {
        if (index1 >= m) return 1;
        double temp = (a[i] - index1) / s1;
        if (t1 >= temp) t1 -= temp, index1 = a[i], s1++;
        else break;
    }
    index1 += t1 * s1;

    int s2 = 1; double t2 = t, index2 = m;
    for (int i = n; i >= 1; --i) {
        if (index2 <= index1) return 1;
        double temp = (index2 - a[i]) / s2;
        if (t2 >= temp) t2 -= temp, s2++, index2 = a[i];
        else break;
    }
    index2 -= t2 * s2;

    return index2 <= index1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &m);
        rep(i, n) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) {
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
        printf("%.8f\n", l);
    }
    return 0;
}


#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+100;
typedef long long LL;
LL a[maxn];
LL n,m;
bool check(double t)
{
    double dis1=0;double cost1=0;
    for(LL i=1;i<=n+1;i++){
        if(cost1+1.0*(a[i]-a[i-1])/i>=t)
        {
            dis1+=(t-cost1)*(i);break;
        }
        else{
            cost1+=1.0*(a[i]-a[i-1])/i;
            dis1=a[i];
        }
    }
    //pos--;
    double cost2=0;double dis2=0;
    for(LL i=n,k=1;i>=0;i--,k++)
    {
        if(cost2+1.0*(a[i+1]-a[i])/k>=t)
        {
            dis2+=(t-cost2)*(k) ;break;
        }
        else{
            cost2+=1.0*(a[i+1]-a[i])/(k);
            dis2=m-a[i];
        }
    }
    if(dis2+dis1>=m)
    {
        return true;
    }
    else return false;
}
int main(void)
{
    cin.tie(0);std::ios::sync_with_stdio(false);
    int t;cin>>t;
    while(t--)
    {
        cin>>n>>m;
        for(LL i=0;i<=n+10;i++) a[i]=0;
        for(LL i=1;i<=n;i++) cin>>a[i];
        a[0]=0;
        a[n+1]=m;
        double l=0;double r=1e18;
        while (r - l > 1E-6) {
            double mid=(l+r)/2;
            if(check(mid)) r=mid;
            else l=mid;
        }
        printf("%.9f\n",l);
    }
    return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
typedef long long LL;
const int N = 1E5 + 10;
ll n, m;
double a[N];
bool judge(const double t) {
    double dis1=0;double cost1=0;
        for(LL i=1;i<=n+1;i++){
            if(cost1+(a[i]-a[i-1])/i>=t)
            {
                dis1+=(t-cost1)*(i);break;
            }
            else{
                cost1+=(a[i]-a[i-1])/i;
                dis1=a[i];
            }
        }
        //pos--;
        double cost2=0;double dis2=0;
        for(LL i=n,k=1;i>=0;i--,k++)
        {
            if(cost2+(a[i+1]-a[i])/k>=t)
            {
                dis2+=(t-cost2)*(k) ;break;
            }
            else{
                cost2+=(a[i+1]-a[i])/(k);
                dis2=m-a[i];
            }
        }
        if(dis2+dis1>=m)
        {
            return true;
        }
        else return false;

}
int main()
{
    int t; cin >> t;
    while (t--) {
        cin >> n >> m;
        rep(i, n) scanf("%lf", &a[i]);
        a[0] = 0, a[n + 1] = m;
        double l = 0, r = 1E10;
        while (r - l > 1E-8) {
            double mid = (l + r) / 2;
            if(judge(mid)) r = mid;
            else l = mid;
        }
        cout << l << endl;
    }
    return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const int N = 1E5 + 10;
int a[N];
int n, m;
bool judge(double t) {
    int s1 = 1; double t1 = t, index1 = 0;
    for (int i = 1; i <= n; ++i) {
        if (index1 >= m) return 1;
        double temp = (a[i] - index1) / s1;
        if (t1 >= temp) t1 -= temp, index1 = a[i], s1++;
        else break;
    }
    index1 += t1 * s1;

    int s2 = 1; double t2 = t, index2 = m;
    for (int i = n; i >= 1; --i) {
        if (index2 <= index1) return 1;
        double temp = (index2 - a[i]) / s2;
        if (t2 >= temp) t2 -= temp, s2++, index2 = a[i];
        else break;
    }
    index2 -= t2 * s2;

    return index2 <= index1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &m);
        rep(i, n) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-7) {
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
            //printf("%.8f  %.8f\n", l, r);
        }
        printf("%.8f\n", l);
    }
    return 0;
}


#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+100;
typedef long long LL;
LL a[maxn];
LL n,m;
bool check(double t)
{
    double dis1=0;double cost1=0;
    for(LL i=1;i<=n+1;i++){
        if(cost1+(a[i]-a[i-1])/i>=t)
        {
            dis1+=(t-cost1)*(i);break;
        }
        else{
            cost1+=(a[i]-a[i-1])/i;
            dis1=a[i];
        }
    }
    //pos--;
    double cost2=0;double dis2=0;
    for(LL i=n,k=1;i>=0;i--,k++)
    {
        if(cost2+(a[i+1]-a[i])/k>=t)
        {
            dis2+=(t-cost2)*(k) ;break;
        }
        else{
            cost2+=(a[i+1]-a[i])/(k);
            dis2=m-a[i];
        }
    }
    if(dis2+dis1>=m)
    {
        return true;
    }
    else return false;
}
int main(void)
{
    cin.tie(0);std::ios::sync_with_stdio(false);
    int t;cin>>t;
    while(t--)
    {
        cin>>n>>m;
        for(LL i=0;i<=n+10;i++) a[i]=0;
        for(LL i=1;i<=n;i++) cin>>a[i];
        a[0]=0;
        a[n+1]=m;
        double l=0;double r=1e18;
        while (r - l > 1E-6) {
            double mid=(l+r)/2;
            if(check(mid)) r=mid;
            else l=mid;
        }
        printf("%.9f\n",l);
    }
    return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (int i = 1; i <= n; ++i)
using namespace std;
typedef long long ll;
const int N = 1E5 + 10;
int a[N];
int n, m;
bool judge(double t) {
    int s1 = 1; double t1 = t, index1 = 0;
    for (int i = 1; i <= n; ++i) {
        if (index1 >= m) return 1;
        double temp = (a[i] - index1) / s1;
        if (t1 >= temp) t1 -= temp, index1 = a[i], s1++;
        else break;
    }
    index1 += t1 * s1;

    int s2 = 1; double t2 = t, index2 = m;
    for (int i = n; i >= 1; --i) {
        if (index2 <= index1) return 1;
        double temp = (index2 - a[i]) / s2;
        if (t2 >= temp) t2 -= temp, s2++, index2 = a[i];
        else break;
    }
    index2 -= t2 * s2;

    return index2 <= index1;
}
int main()
{
    int t; cin >> t;
    while (t--) {
        scanf("%d %d", &n, &m);
        rep(i, n) scanf("%d", &a[i]);
        double l = 0, r = 1E10;
        while (r - l > 1E-6) {
            double mid = (l + r) / 2;
            if (judge(mid)) r = mid;
            else l = mid;
        }
        cout << l << endl;
    }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define mod 1000000007
#define int long long
#define fio ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL)
#define endl "\n"

const int maxn = 1e5+5;
int ar[maxn];

void solve()
{
    int n,l;
    cin>>n>>l;
    for(int i=0;i<n;i++)
        cin>>ar[i];
    int r=0;
    int speed=2;
    int i=0,j=n-1;
    double ans=0.0,d;
    while(i<=j)
    {
        if(ar[i]-r <= l-ar[j])
        {
            d=2.0*(ar[i]-r);
            ans += 1.0*d/speed;
            speed++;
            l-=ar[i]-r;
            r=ar[i];
            i++;
        }
        else
        {
            d=2.0*(l-ar[j]);
            ans += 1.0*d/speed;
            speed++;
            r+=l-ar[j];
            l=ar[j];
            j--;
        }
    }
    ans += 1.0*(l-r)/speed;
    printf("%0.6f\n",ans);
}

int32_t main()
{
    fio;
    int t;
    cin>>t;
    // t=0;
    while(t--)
        solve();
}


// Author: Harshdeep Sharma , IIT  Indore
#pragma GCC optimize("O2")
#include <bits/stdc++.h>
using namespace std;
// #define MOD  998244353
#define ll long long
const double PI = atan(1.0) * 4;
// const ll INF = (int)1e9 ;
const int di[4] = { -1, 0, 1, 0} ;
const int dj[4] = {0, -1, 0, 1} ;
// const ll INF = (ll)2e18 + 50;
const int INF = 1e9 ;
const int maximum  = numeric_limits<int>::max();
const int minimum  = numeric_limits<int>::min();
const ll mod = 1e9 + 7 ;

int gcd (int a, int b) {
	return b ? gcd (b, a % b) : a;
}

int lcm (int a, int b) {
	return a / gcd(a, b) * b;
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int t ;
	cin >> t ;
	// t = 1 ;
	while (t--) {
		int n  , l ;
		cin >> n >> l ;
		vector<int> a(n) ;
		for (int i  = 0 ; i < n ; i++) {
			cin >> a[i] ;
		}
		long double ans = 0 ;
		int lo = 0 , hi = n - 1 ;
		int speed1 = 1 , speed2 = 1 ;
		long double lst1 = 0 , lst2 = l ;
		while (lo <= hi ) {
			long double tl = (1.0 * (a[lo] - lst1 ) ) / speed1  ;
			long double tr = (1.0 * (lst2 - a[hi])) / speed2 ;
			long double cur = min(tl , tr) ;
			if (tl <= tr) {
				ans += tl ;
				lst1 +=  cur * speed1 ;
				lst2 -= cur * speed2 ;
				lo++ ;
				speed1++ ;
			} else {
				ans += tr ;
				lst1 += cur * speed1 ;
				lst2 -= cur * speed2 ;
				hi-- ;
				speed2++ ;
			}

		}

		if (lst1 != lst2) {
			ans += (lst2 - lst1) / (speed1 + speed2 )  ;
		}

		std::cout << std::setprecision(12) << ans << '\n';

	}

	return 0 ;

}


// Author: Harshdeep Sharma , IIT  Indore
#pragma GCC optimize("O2")
#include <bits/stdc++.h>
using namespace std;
// #define MOD  998244353
#define ll long long
const double PI = atan(1.0) * 4;
// const ll INF = (int)1e9 ;
const int di[4] = { -1, 0, 1, 0} ;
const int dj[4] = {0, -1, 0, 1} ;
// const ll INF = (ll)2e18 + 50;
const int INF = 1e9 ;
const int maximum  = numeric_limits<int>::max();
const int minimum  = numeric_limits<int>::min();
const ll mod = 1e9 + 7 ;

int gcd (int a, int b) {
	return b ? gcd (b, a % b) : a;
}

int lcm (int a, int b) {
	return a / gcd(a, b) * b;
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int t ;
	cin >> t ;
	// t = 1 ;
	while (t--) {
		int n  , l ;
		cin >> n >> l ;
		vector<int> a(n) ;
		for (int i  = 0 ; i < n ; i++) {
			cin >> a[i] ;
		}
		long double ans = 0 ;
		int lo = 0 , hi = n - 1 ;
		int speed1 = 1 , speed2 = 1 ;
		long double lst1 = 0 , lst2 = l ;
		while (lo <= hi ) {
			long double tl = (1.0 * (a[lo] - lst1 ) ) / speed1  ;
			long double tr = (1.0 * (lst2 - a[hi])) / speed2 ;
			long double cur = min(tl , tr) ;
			if (tl <= tr) {
				ans += tl ;
				lst1 +=  cur * speed1 ;
				lst2 -= cur * speed2 ;
				lo++ ;
				hi-- ;
			} else {
				ans += tr ;
				lst1 += cur * speed1 ;
				lst2 -= cur * speed2 ;
				lo++ ;
				hi-- ;
			}

		}

		if (lst1 != lst2) {
			ans += (lst2 - lst1) / (speed1 + speed2 )  ;
		}

		std::cout << std::setprecision(12) << ans << '\n';

	}

	return 0 ;

}


// Author: Harshdeep Sharma , IIT  Indore
#pragma GCC optimize("O2")
#include <bits/stdc++.h>
using namespace std;
// #define MOD  998244353
#define ll long long
const double PI = atan(1.0) * 4;
// const ll INF = (int)1e9 ;
const int di[4] = { -1, 0, 1, 0} ;
const int dj[4] = {0, -1, 0, 1} ;
// const ll INF = (ll)2e18 + 50;
const int INF = 1e9 ;
const int maximum  = numeric_limits<int>::max();
const int minimum  = numeric_limits<int>::min();
const ll mod = 1e9 + 7 ;

int gcd (int a, int b) {
	return b ? gcd (b, a % b) : a;
}

int lcm (int a, int b) {
	return a / gcd(a, b) * b;
}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int t ;
	cin >> t ;
	// t = 1 ;
	while (t--) {
		int n  , l ;
		cin >> n >> l ;
		vector<double> a(n) ;
		for (int i  = 0 ; i < n ; i++) {
			cin >> a[i] ;
		}
		double ans = 0.0 ;
		int lo = 0 , hi = n - 1 ;
		double speed1 = 1.0 , speed2 = 1.0 ;
		double lst1 = 0.0 , lst2 = l ;
		while (lo <= hi && lo < n && hi >= 0 ) {
			double gap1 = a[lo] - lst1 ;
			// double lst1 = a[0] ;
			double gap2 = lst2 - a[hi] ;
			// double lst2 = a[n-1] ;
			if (gap1 == gap2) {
				ans += (gap1 + gap2) / (speed1 + speed2) ;
				speed1 = speed1 + 1.0 ;
				speed2 = speed2 + 1.0 ;
				lst1 = a[lo] ;
				lst2 = a[hi] ;
				lo++ ;
				hi-- ;
			} else if (gap1 > gap2) {
				ans += (gap2 + gap2) / (speed1 + speed2) ;
				// speed1 = speed1 + 1.0 ;
				speed2 = speed2 + 1.0 ;
				lst1 = lst1 + gap2 ;
				lst2 = a[hi] ;
				hi-- ;

			} else if (gap1 < gap2) {
				ans += (gap1 + gap1) / (speed1 + speed2) ;
				speed1 = speed1 + 1.0 ;
				// speed2 = speed2 + 1.0 ;
				lst1 = a[lo] ;
				lst2 = lst2 - gap1 ;
				lo++ ;

			}

		}

		// std::cout << std::setprecision(6) <<  lo << " " << lst1 << " " << lst2 << " " << hi << "\n";
		if (lo != hi) {
			ans += (lst2 - lst1) / (speed1 + speed2)  ;
		}
		// else {

		// }

		std::cout << std::setprecision(6) << ans << '\n';

	}

	return 0 ;

}


#include <bits/stdc++.h>

using namespace std;

#define mod 1000000007
#define int long long
#define fio ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL)
#define endl "\n"

const int maxn = 1e5+5;
int ar[maxn];

void solve()
{
    int n,l;
    cin>>n>>l;
    for(int i=0;i<n;i++)
        cin>>ar[i];
    int r=0;
    int speed=2;
    int i=0,j=n-1;
    double ans=0.0,d;
    while(i<=j)
    {
        if(1.0*(ar[i]-r) <= 1.0*(l-ar[j]))
        {
            d=2.0*(ar[i]-r);
            ans += 1.0*d/speed;
            speed++;
            l-=ar[i]-r;
            r=ar[i];
            i++;
        }
        else
        {
            d=2.0*(l-ar[j]);
            ans += 1.0*d/speed;
            speed++;
            r+=l-ar[j];
            l=ar[j];
            j--;
        }
    }
    ans += 1.0*(l-r)/speed;
    printf("%0.6f\n",ans);
}

int32_t main()
{
    fio;
    int t;
    cin>>t;
    // t=0;
    while(t--)
        solve();
}


#include<bits/stdc++.h>
#define ll long long int
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vpii vector< pii >
#define vpll vector< pll >
#define mpii map<int,int>
#define mpll map<ll,ll>
#define MOD 1000000007
#define all(v) v.begin(),v.end()
#define s(v) v.size()
#define test ll t;cin>>t;while(t--)
#define vec vector<ll>
#define read0(v,n) for(int i=0;i<n;i++)cin>>v[i];
#define read1(v,n) for(int i=1;i<=n;i++)cin>>v[i];
#define trav(a,x) for (auto& a: x)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define cut(x) {cout<<x;return 0;}
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORB(i,a,b) for(int i=a;i>=b;i--)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define f first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define nl '\n'
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;
#define oset tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
ll gcd(ll a, ll b)
{
	if (b==0)return a;
	return gcd(b, a % b);
}
ll lcm(ll a,ll b)
{
    return (a*b)/gcd(a,b);
}
ll pow(ll a, ll b)
{
	ll ans=1;
	while(b)
	{
		if(b&1)
			ans=(ans*a)%MOD;
		b/=2;
		a=(a*a)%MOD;
	}
	return ans;
}

int main()
{
    test
    {
        int n;double l;
        cin>>n>>l;
        vector<double> v(n+1);read1(v,n);
        double time=0,left=0,right=l;
        double dist=0;
        int i=1,j=n;
        double sp1=1,sp2=1;
        while(true)
        {
           // double d1,d2;
           if(i>j)
            {
                time+=(right-left)/(sp1+sp2);
                break;
            }
            double t1,t2;
            t1=(v[i]-left)/sp1;
            t2=(right-v[j])/sp2;
            if(abs(t1-t2)<=0.0000000001)left=v[i],right=v[j],sp1++,sp2++,time+=t1,i++,j--;
            else if(t2>t1)
            {
                right-=sp2*t1;
                left=v[i];i++;
                time+=t1;
                sp1++;
            }
           else if(t2<t1)
            {
                left+=sp1*t2;
                right=v[j];j--;
                time+=t2;
                sp2++;
            }

        }
        cout<<fixed<<setprecision(10)<<time<<nl;

    }
}


#include<bits/stdc++.h>
#define ll long long int
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vpii vector< pii >
#define vpll vector< pll >
#define mpii map<int,int>
#define mpll map<ll,ll>
#define MOD 1000000007
#define all(v) v.begin(),v.end()
#define s(v) v.size()
#define test ll t;cin>>t;while(t--)
#define vec vector<ll>
#define read0(v,n) for(int i=0;i<n;i++)cin>>v[i];
#define read1(v,n) for(int i=1;i<=n;i++)cin>>v[i];
#define trav(a,x) for (auto& a: x)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define cut(x) {cout<<x;return 0;}
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORB(i,a,b) for(int i=a;i>=b;i--)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define f first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define nl '\n'
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;
#define oset tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
ll gcd(ll a, ll b)
{
	if (b==0)return a;
	return gcd(b, a % b);
}
ll lcm(ll a,ll b)
{
    return (a*b)/gcd(a,b);
}
ll pow(ll a, ll b)
{
	ll ans=1;
	while(b)
	{
		if(b&1)
			ans=(ans*a)%MOD;
		b/=2;
		a=(a*a)%MOD;
	}
	return ans;
}

int main()
{
    test
    {
        int n;double l;
        cin>>n>>l;
        vector<double> v(n+1);read1(v,n);
        double time=0,left=0,right=l;
        double dist=0;
        int i=1,j=n;
        double sp1=1,sp2=1;
        while(true)
        {
           // double d1,d2;
           if(i>j)
            {
                time+=(right-left)/(sp1+sp2);
                break;
            }
            double t1,t2;
            t1=(v[i]-left)/sp1;
            t2=(right-v[j])/sp2;
            if(abs(t1-t2)<=0.000001)left=v[i],right=v[j],sp1++,sp2++,time+=t1,i++,j--;
            else if(t2-t1>=0.000001)
            {
                right-=sp2*t1;
                if(right-v[j]<=0.000001)right=v[j],j--;
                left=v[i];i++;
                time+=t1;
                sp1++;
            }
           else if(t1-t2>=0.000001)
            {
                left+=sp1*t2;
                if(v[i]-left<=0.000001)left=v[i],i++;
                right=v[j];j--;
                time+=t2;
                sp2++;
            }

        }
        cout<<fixed<<setprecision(10)<<time<<nl;

    }
}


#include<bits/stdc++.h>
#define ll long long int
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vpii vector< pii >
#define vpll vector< pll >
#define mpii map<int,int>
#define mpll map<ll,ll>
#define MOD 1000000007
#define all(v) v.begin(),v.end()
#define s(v) v.size()
#define test ll t;cin>>t;while(t--)
#define vec vector<ll>
#define read0(v,n) for(int i=0;i<n;i++)cin>>v[i];
#define read1(v,n) for(int i=1;i<=n;i++)cin>>v[i];
#define trav(a,x) for (auto& a: x)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define cut(x) {cout<<x;return 0;}
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORB(i,a,b) for(int i=a;i>=b;i--)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define f first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define nl '\n'
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;
#define oset tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
ll gcd(ll a, ll b)
{
	if (b==0)return a;
	return gcd(b, a % b);
}
ll lcm(ll a,ll b)
{
    return (a*b)/gcd(a,b);
}
ll pow(ll a, ll b)
{
	ll ans=1;
	while(b)
	{
		if(b&1)
			ans=(ans*a)%MOD;
		b/=2;
		a=(a*a)%MOD;
	}
	return ans;
}

int main()
{
    test
    {
        int n;double l;
        cin>>n>>l;
        vector<double> v(n+1);read1(v,n);
        double time=0,left=0,right=l;
        double dist=0;
        int i=1,j=n;
        double sp1=1,sp2=1;
        while(true)
        {
           // double d1,d2;
           if(i>j)
            {
                time+=(right-left)/(sp1+sp2);
                break;
            }
            double t1,t2;
            t1=(v[i]-left)/sp1;
            t2=(right-v[j])/sp2;
            if(abs(t1-t2)<=0.00000005)left=v[i],right=v[j],sp1++,sp2++,time+=t1,i++,j--;
            else if(t2-t1>=0.00000005)
            {
                right-=sp2*t1;
                if(right-v[j]<=0.00000005)right=v[j],j--;
                left=v[i];i++;
                time+=t1;
                sp1++;
            }
           else if(t1-t2>=0.00000005)
            {
                left+=sp1*t2;
                if(v[i]-left<=0.00000005)left=v[i],i++;
                right=v[j];j--;
                time+=t2;
                sp2++;
            }

        }
        cout<<fixed<<setprecision(10)<<time<<nl;

    }
}


#include<bits/stdc++.h>
#define ll long long int
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vpii vector< pii >
#define vpll vector< pll >
#define mpii map<int,int>
#define mpll map<ll,ll>
#define MOD 1000000007
#define all(v) v.begin(),v.end()
#define s(v) v.size()
#define test ll t;cin>>t;while(t--)
#define vec vector<ll>
#define read0(v,n) for(int i=0;i<n;i++)cin>>v[i];
#define read1(v,n) for(int i=1;i<=n;i++)cin>>v[i];
#define trav(a,x) for (auto& a: x)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define cut(x) {cout<<x;return 0;}
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORB(i,a,b) for(int i=a;i>=b;i--)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define f first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define nl '\n'
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;
#define oset tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
ll gcd(ll a, ll b)
{
	if (b==0)return a;
	return gcd(b, a % b);
}
ll lcm(ll a,ll b)
{
    return (a*b)/gcd(a,b);
}
ll pow(ll a, ll b)
{
	ll ans=1;
	while(b)
	{
		if(b&1)
			ans=(ans*a)%MOD;
		b/=2;
		a=(a*a)%MOD;
	}
	return ans;
}

int main()
{
    test
    {
        int n;double l;
        cin>>n>>l;
        vector<double> v(n+1);read1(v,n);
        double time=0,left=0,right=l;
        double dist=0;
        int i=1,j=n;
        double sp1=1,sp2=1;
        while(true)
        {
           // double d1,d2;
           if(i>j)
            {
                time+=(right-left)/(sp1+sp2);
                break;
            }
            double t1,t2;
            t1=(v[i]-left)/sp1;
            t2=(right-v[j])/sp2;
            if(abs(t1-t2)<=0.000005)left=v[i],right=v[j],sp1++,sp2++,time+=t1,i++,j--;
            else if(t2-t1>=0.000005)
            {
                right-=sp2*t1;
                if(right-v[j]<=0.000005)right=v[j],j--;
                left=v[i];i++;
                time+=t1;
                sp1++;
            }
           else if(t1-t2>=0.000005)
            {
                left+=sp1*t2;
                if(v[i]-left<=0.000005)left=v[i],i++;
                right=v[j];j--;
                time+=t2;
                sp2++;
            }

        }
        cout<<fixed<<setprecision(10)<<time<<nl;

    }
}


#include<bits/stdc++.h>
#define ll long long int
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vpii vector< pii >
#define vpll vector< pll >
#define mpii map<int,int>
#define mpll map<ll,ll>
#define MOD 1000000007
#define all(v) v.begin(),v.end()
#define s(v) v.size()
#define test ll t;cin>>t;while(t--)
#define vec vector<ll>
#define read0(v,n) for(int i=0;i<n;i++)cin>>v[i];
#define read1(v,n) for(int i=1;i<=n;i++)cin>>v[i];
#define trav(a,x) for (auto& a: x)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define cut(x) {cout<<x;return 0;}
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORB(i,a,b) for(int i=a;i>=b;i--)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define f first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define nl '\n'
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;
#define oset tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
ll gcd(ll a, ll b)
{
	if (b==0)return a;
	return gcd(b, a % b);
}
ll lcm(ll a,ll b)
{
    return (a*b)/gcd(a,b);
}
ll pow(ll a, ll b)
{
	ll ans=1;
	while(b)
	{
		if(b&1)
			ans=(ans*a)%MOD;
		b/=2;
		a=(a*a)%MOD;
	}
	return ans;
}

int main()
{
    test
    {
        int n;double l;
        cin>>n>>l;
        vector<double> v(n+1);read1(v,n);
        double time=0,left=0,right=l;
        double dist=0;
        int i=1,j=n;
        double sp1=1,sp2=1;
        while(true)
        {
           // double d1,d2;
           if(i>j)
            {
                time+=(right-left)/(sp1+sp2);
                break;
            }
            double t1,t2;
            t1=(v[i]-left)/sp1;
            t2=(right-v[j])/sp2;
            if(abs(t1-t2)<=0.005)left=v[i],right=v[j],sp1++,sp2++,time+=t1,i++,j--;
            else if(t2-t1>=0.005)
            {
                right-=sp2*t1;
                if(right-v[j]<=0.005)right=v[j],j--;
                left=v[i];i++;
                time+=t1;
                sp1++;
            }
           else if(t1-t2>=0.005)
            {
                left+=sp1*t2;
                if(v[i]-left<=0.005)left=v[i],i++;
                right=v[j];j--;
                time+=t2;
                sp2++;
            }

        }
        cout<<fixed<<setprecision(10)<<time<<nl;

    }
}