#include <bits/stdc++.h>
using namespace std;
long double a, b, c, d;
bool f(long double x) {
  long double mn1 = a - x, mx1 = a + x, mn2 = d - x, mx2 = d + x, mn3 = b - x,
              mx3 = b + x, mn4 = c - x, mx4 = c + x;
  long double l1 = mn1 * mn2, r1 = mx1 * mx2, l2 = mn3 * mn4, r2 = mx3 * mx4;
  if (l1 > r1) swap(l1, r1);
  if (l2 > r2) swap(l2, r2);
  if (!(l1 > r2 || r1 < l2)) return 1;
  l1 = mn1 * mx2, r1 = mn2 * mx1;
  if (l1 > r1) swap(l1, r1);
  if (!(l1 > r2 || r1 < l2)) return 1;
  l2 = mn3 * mx4, r2 = mn4 * mx3;
  if (l2 > r2) swap(l2, r2);
  if (!(l1 > r2 || r1 < l2)) return 1;
  l1 = mn1 * mn2, r1 = mx1 * mx2;
  if (l1 > r1) swap(l1, r1);
  if (!(l1 > r2 || r1 < l2)) return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> a >> b >> c >> d;
  long double st = 0, en = 1e10, md, ans;
  int cnt = 200;
  while (st <= en && cnt--) {
    md = (st + en) / 2;
    if (f(md))
      ans = md, en = md;
    else
      st = md;
  }
  cout << fixed << setprecision(10) << ans;
}
