#include <bits/stdc++.h>
using namespace std;
int n, r, v, s, f;
int main() {
  scanf("%d%d%d", &n, &r, &v);
  double C = 2 * 3.1415926535897932384626 * r;
  double T = C / v;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &s, &f);
    double dist = f - s;
    int q = (int)(dist / C);
    double rem = dist - C * q;
    double res = q * T;
    double lo = 0;
    double hi = T / 2;
    for (int j = 0; j < 100; j++) {
      double mid = (lo + hi) / 2;
      double mdist = r * cos(3.1415926535897932384626 / 2 -
                             2 * 3.1415926535897932384626 * mid / T) +
                     C * mid / T;
      if (mdist > rem / 2) {
        hi = mid;
      } else {
        lo = mid;
      }
    }
    res += (lo + hi);
    printf("%.17g\n", res);
  }
  return 0;
}
