#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (int i = int(n); i >= 0; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define repic(i, a, b) for (int i = int(a); i <= int(b); i++)
#define each(x, y) for (auto &x : y)
#define all(a) (a).begin(), (a).end()
#define bit32(x) (1 << (x))
#define bit64(x) (1ll << (x))
#define sz(v) ((int) v.size())

using namespace std;

using i64 = long long;
using f80 = long double;
using vi32 = vector<int>;
using vi64 = vector<i64>;
using vf80 = vector<f80>;
using vstr = vector<string>;

inline void yes() { cout << "Yes" << endl; exit(0); }
inline void no() { cout << "No" << endl; exit(0); }
template <typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
template <typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
template <typename T> inline void amax(T &x, T y) { x = max(x, y); }
template <typename T> inline void amin(T &x, T y) { x = min(x, y); }
template <typename T> inline T exp(T x, i64 n, T e = 1) { T r = e; while (n > 0) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; }
template <typename T> istream& operator>>(istream &is, vector<T> &v) { each(x, v) is >> x; return is; }
template <typename T> ostream& operator<<(ostream &os, vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }
void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }

double dp[31][31][31];

void solve() {
  while (true) {
    int N, M;
    cin >> N >> M;
    if (N == 0 && M == 0) {
      return;
    }
    int s, g;
    cin >> s >> g;
    s--, g--;
    vector<vector<tuple<int, int, int>>> graph(N);
    rep(i, M) {
      int x, y, d, c;
      cin >> x >> y >> d >> c;
      x--, y--;
      graph[x].emplace_back(y, d, c);
      graph[y].emplace_back(x, d, c);
    }
    repc(i, 30) repc(j, 30) repc(k, 30) {
      dp[i][j][k] = 1e18;
    }
    pqasc<tuple<double, int, int, int>> q; // time, speed, vertex, parent
    q.emplace(0, 0, s, 30);
    while (sz(q)) {
      double time;
      int speed, u, par;
      tie(time, speed, u, par) = q.top(), q.pop();
      if (dp[u][par][speed] != 1e18) {
        continue;
      }
      dp[u][par][speed] = time;
      each(e, graph[u]) {
        int v, d, c;
        tie(v, d, c) = e;
        if (v == par) continue;
        if (speed + 1 <= c) {
          int s = speed + 1;
          if (dp[v][u][s] == 1e18) {
            q.emplace(time + (double) d / s, s, v, u);
          }
        }
        if (speed - 1 <= c && speed > 1) {
          int s = speed - 1;
          if (dp[v][u][s] == 1e18) {
            q.emplace(time + (double) d / s, s, v, u);
          }
        }
        if (speed <= c) {
          int s = speed;
          if (dp[v][u][s] == 1e18) {
            q.emplace(time + (double) d / s, s, v, u);
          }
        }
      }
    }
    double ans = 1e18;
    rep(j, 30) amin(ans, dp[g][j][1]);
    if (ans == 1e18) {
      cout << "unreachable" << endl;
    } else {
      cout << ans << endl;
    }
  }
}


Measured memory_bytes: 15468