#include <bits/stdc++.h>
#define fto(i,a,b) for(int i = a; i <= b; ++i)
#define fdto(i,a,b) for(int i = a; i >= b; --i)
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2*((begin) > end))
#define ll long long
#define ii int,int
#define iii int,int,int
#define ff first
#define ss second
#define sz(a) int(a.size())
#define pb push_back
#define pob pop_back
#define mp make_pair
#define mt make_tuple
#define fastIO ios_base::sync_with_stdio(0); cin.tie(0)
#define gen rng(chrono::steady_clock::now().time_since_epoch().count())
#define rd(x,y) (rng()%(y-x+1)+x)
using namespace std;
const int N = 1e2;
const int M = 1e2;
const int oo = 2e9;
long double a,b,v1,v2;
long double t(long double x) {
return sqrtl(a*a + x*x)/v1 + (b-x)/v2;
}
long double tertnary_search(long double left, long double right) {
fto(i,1,100) {
long double c,d;
c = left + (right-left)/3;
d = right - (right-left)/3;
if (t(c) > t(d)) left = c;
else right = d;
}
return t(left);
}
int main() {
#define NAME "dichuyen"
#ifndef ONLINE_JUDGE
freopen(NAME".inp", "r", stdin);
//freopen(NAME".out", "w", stdout);
#endif // ONLINE_JUDGE
int t; cin >> t;
while (t--) {
cin >> a >> b >> v1 >> v2;
long double ans;
ans = tertnary_search(0,b);
cout << setprecision(6) << fixed << ans << '\n';
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgZnRvKGksYSxiKSBmb3IoaW50IGkgPSBhOyBpIDw9IGI7ICsraSkKI2RlZmluZSBmZHRvKGksYSxiKSBmb3IoaW50IGkgPSBhOyBpID49IGI7IC0taSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI2RlZmluZSByZXAoaSwgYmVnaW4sIGVuZCkgZm9yIChfX3R5cGVvZihlbmQpIGkgP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