#include <bits/stdc++.h>
using namespace std;

const double INF = 1e9;
const double eps = 1e-5;
using pdi = pair<double, pair<int, int>>;
using tp4 = tuple<double, int, int, int>;

int N, M;

struct edge
{
    int to;
    double cost;
    int lim;
    edge(int t, double d, int l) : to(t), cost(d), lim(l) {}
};
// dist,v,pv,velocity
void dijkstra(int s, vector<vector<vector<double>>> &dist, vector<vector<edge>> &G)
{
    priority_queue<tp4, vector<tp4>, greater<tp4>> que;
    for (auto e : G[s])
    {
        int ns = e.to;
        que.push(make_tuple(e.cost, ns, s, 1));
        dist[ns][s][1] = e.cost;
    }
    while (!que.empty())
    {
        auto p = que.top();
        que.pop();
        double d = get<0>(p);
        int v = get<1>(p);
        int par = get<2>(p);
        int velo = get<3>(p);

        if (dist[v][par][velo] - d < -eps)
            continue;
        for (edge e : G[v])
        {
            if (e.to == par)
                continue;
            for (int nvelo = max(velo - 1, 1); nvelo <= min(velo + 1, e.lim); nvelo++)
            {
                if (dist[e.to][v][nvelo] - dist[v][par][velo] - e.cost / (double)nvelo > eps)
                {
                    dist[e.to][v][nvelo] = dist[v][par][velo] + e.cost / (double)nvelo;
                    que.push(make_tuple(dist[e.to][v][nvelo], e.to, v, nvelo));
                }
            }
        }
    }
}

int main()
{
    while (cin >> N >> M, N | M)
    {
        int s, g;
        cin >> s >> g;
        s--, g--;
        vector<vector<edge>> G(N);
        for (int i = 0; i < M; i++)
        {
            int a, b, c, d;
            cin >> a >> b >> c >> d;
            a--, b--;
            G[a].push_back(edge(b, c, d));
            G[b].push_back(edge(a, c, d));
        }
        double res = INF;
        vector<vector<vector<double>>> dist(N, vector<vector<double>>(N, vector<double>(31, INF)));
        dijkstra(s, dist, G);
        for (int v = 0; v < N; v++)
        {
            res = min(res, dist[g][v][1]);
        }

        if (abs(res - INF) < eps)
        {
            cout << "unreachable" << endl;
        }
        else
        {
            cout << fixed << setprecision(10) << res << endl;
        }
        // s+N -> g+N
    }
}
