#include <bits/stdc++.h>
using namespace std;
int main() {
  int _sc;
  int N, iR, iV;
  _sc = scanf("%d%d%d", &N, &iR, &iV);
  const double R = iR, V = iV;
  const double period = 2.0 * M_PI * R / V;
  for (int i = 0; i < (int)(N); i++) {
    int si, fi;
    _sc = scanf("%d%d", &si, &fi);
    const double L = fi - si;
    double totalT = 1.0 / 0.0;
    for (int kfactor = 0; kfactor < (int)(2); kfactor++) {
      double tA = L / (2.0 * V), tB = L / V + period;
      while (0.5 * (tB - tA) / tA > 1e-6) {
        const double tC = 0.5 * (tA + tB);
        const double x =
            V * tC + 2.0 * R * sin(M_PI * kfactor + 0.5 * V / R * tC);
        if (x < L)
          tA = tC;
        else
          tB = tC;
      }
      totalT = min(totalT, (tA + tB) * 0.5);
    }
    printf("%.15lf\n", totalT);
  }
  if (_sc) return 0;
  return 0;
}
