#include <math.h> #include <stdio.h> int main() { double pi = acos(-1); double precision = 0.00001 * pi / 180; double d, h, x, n1, n2; while (scanf("%lf %lf %lf %lf %lf", &d, &h, &x, &n1, &n2) && d) { double phi_min = 0; double phi_max = pi / 2; while (phi_max - phi_min > precision) { double phi = (phi_min + phi_max) / 2; double theta1 = pi / 2 - phi; double theta2 = asin(n2 * sin(theta1) / n1); if (d * tan(theta1) + h * tan(theta2) > x) { phi_min = phi; } else { phi_max = phi; } } printf("%0.02lf\n", phi_min * 180 / pi); } }