#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-12;
int main() {
  int n;
  double r, v, T;
  scanf("%d%lf%lf", &n, &r, &v);
  T = 2 * acos(-1) * r / v;
  for (int i = 0; i < n; i++) {
    double s, f, tim, tot = 0;
    scanf("%lf%lf", &s, &f);
    tim = (f - s) / v;
    tot = T * floor(tim / T);
    tim -= tot;
    double lef = 0.0, rig = T;
    for (int j = 0; j < 100; j++) {
      double t = (lef + rig) / 2.0;
      double g = t + (2.0 * r / v) * sin(v * t / (2.0 * r));
      if (g - tim >= -eps)
        rig = t;
      else
        lef = t;
    }
    tot += lef;
    printf("%.12lf\n", tot);
  }
  return 0;
}
