func_code_string: #include <bits/stdc++.h>   const double EPS = 1e-9;   const int MAX_REPS = 2000;   double bx, by, h, r;   void solve(double x, double& y1, double& y2, double& y3) {     double A1, A2, B1, B2, C1, C2, dy1, dy2, dx, dy;     dx = -(x - bx);     dy = ((h - r) - by);     A1 = -dy;     B1 = dx;     C1 = A1 * x + B1 * (h - r);     y1 = C1 / B1;     A2 = -B1;     B2 = A1;     C2 = B2 * y1;     dy1 = ((C1 - A1) / B1) - (C1 / B1);     dy2 = ((C2 - A2) / B2) - (C2 / B2);     assert(dy1 > 0);     assert(dy2 < 0);     A1 = dy1 - dy2;     B1 = sqrt(1 + dy2 * dy2);     y2 = y1 + A1 / B1 * (B1 + r) - A1;     y3 = y1 + A1 / B1 * (B1 - r) - A1;   }   int main(void) {     int i;     double yl, yh, frl, tol, frh, toh, mi, bc, bh, bl;     std::cin >> yl >> yh >> h >> bx >> by >> r;     frh = 0;     toh = bx - r / 2;     for (i = 0; i < MAX_REPS && fabs(frh - toh) >= EPS; ++i) {       mi = (frh + toh) / 2;       solve(mi, bc, bh, bl);       if (bh >= yh) {         frh = mi;       } else {         toh = mi;       }     }     frl = 0;     tol = bx - r / 2;     for (i = 0; i < MAX_REPS && fabs(frl - tol) >= EPS; ++i) {       mi = (frl + tol) / 2;       solve(mi, bc, bh, bl);       if (bc - r <= yl) {         tol = mi;       } else {         frl = mi;       }     }     mi = (frl + frh) / 2;     solve(mi, bc, bh, bl);     if (bc - r < yl || bh > yh) {       std::cout <<  -1  << std::endl;     } else {       std::cout << (frl + frh) / 2 << std::endl;     }     return 0;   }   