#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-7;
const double PI = acos(-1.0);
double r, v, s, f;
double gao(double sgn) {
  double low = 0, high = f - s + 2 * PI * r;
  for (int i = 0; i < (70); ++i) {
    double mid = (low + high) / 2;
    (mid + r * sgn * sin(mid / r) > (f - s) / 2 ? high : low) = mid;
  }
  return low / v * 2;
}
int main() {
  int n;
  scanf("%d%lf%lf", &n, &r, &v);
  for (int i = 0; i < (n); ++i) {
    scanf("%lf%lf", &s, &f);
    printf("%.20f\n", min(gao(1), gao(-1)));
  }
  return 0;
}
