#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  double r, v, s, f, d, dis, lef, rig, mid;
  while (cin >> n >> r >> v) {
    while (n--) {
      scanf("%lf%lf", &s, &f);
      d = f - s;
      lef = 0;
      rig = 1e9;
      for (i = 0; i < 50; i++) {
        mid = (lef + rig) * 0.5;
        dis = mid * v + r * fabs(sin(mid * v / r));
        if (dis * 2 > d)
          rig = mid;
        else
          lef = mid;
      }
      printf("%.9f\n", lef + rig);
    }
  }
}
