//#define _GLIBCXX_DEBUG #include #include #include #include using namespace std; using namespace atcoder; using mint = modint1000000007; using ll = long long; using pii = pair; using pll = pair; using vi = vector; using vvi = vector; using vl = vector; using vvl = vector; using vb = vector; using vvb = vector; using vm = vector; using vvm = vector; using vpi = vector; using vvpi = vector; using vpl = vector; using vvpl = vector; const int inf = 1 << 30; const ll INF = 1LL << 60; #define rep(i,m,n) for (int i = m; i < (int)(n); i++) #define rrep(i,m,n) for (int i = m; i > (int)(n); i--) long double xa,ya,xb,yb; long double f(long double y){ return pow((xa*xa + (y-ya)*(y-ya)),0.5) + pow((xb*xb + (y-yb)*(y-yb)),0.5); } int main(){ cout << fixed << setprecision(10); cin >> xa >> ya >> xb >> yb; long double low = 0.0, high = 1000.0; rep(_,0,10000){ long double a = (2*low+high)/3, b = (low+2*high)/3; if (f(a) >= f(b)) low = a; else high = b; //cout << low << " " << high << endl; } cout << low << endl; }