#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10000000000")
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  int n, rad, v;
  cin >> n >> rad >> v;
  cout << fixed << setprecision(10);
  long double len = 2 * acos(-1.0) * rad;
  for (int i = 0; i < n; ++i) {
    int s, f;
    cin >> s >> f;
    long double dist = (f - s) - floor((f - s) / len) * len;
    long double l = 0, r = len;
    for (int j = 0; j < 100; ++j) {
      long double m = (l + r) / 2;
      if (m + rad * sin(m / rad) >= dist / 2)
        r = m;
      else
        l = m;
    }
    long double ll = 0, rr = len;
    for (int j = 0; j < 100; ++j) {
      long double mm = (ll + rr) / 2;
      if (mm - rad * sin(mm / rad) >= dist / 2)
        rr = mm;
      else
        ll = mm;
    }
    r = min(r, rr);
    cout << (2 * r + len * floor((f - s) / len)) / v << '\n';
  }
  return 0;
}
