#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define EACH(i, c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

//#define LOCAL 0
//#ifdef LOCAL
//#define DEBUG(s) cout << (s) << endl
//#define dump(x)  cerr << #x << " = " << (x) << endl
//#define BR cout << endl;
//#else
//#define DEBUG(s) do{}while(0)
//#define dump(x) do{}while(0)
//#define BR
//#endif


//改造
typedef long long int ll;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0 //デバッグする時1にしてね
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 1000000007
//ここから編集する

class Dijkstra {
    using T = double;
public:
    struct edge {
        int to;
        T cost;
    };
    typedef pair<T, int> P;//firstは最短距離、secondは頂点の番号

    int V;//超点数
    vector<vector<edge> > G;//グラフ,G[i]はiから出る辺の集合,G[i][j]はiから出る辺のj番目の辺
    vector<T> d; //最短距離

    //0origin
    Dijkstra(int N) {
        V = N;
        G = vector<vector<edge> >(N);
        d = vector<T>(N);
    };

    void dijkstra(int s) {
        priority_queue<P, vector<P>, greater<P> > que;
        fill(d.begin(), d.end(), INFl);
        d[s] = 0;
        que.push(P(0, s));

        while (!que.empty()) {
            P p = que.top();
            que.pop();
            int v = p.second;
            if (d[v] < p.first) continue;
            for (int i = 0; i < G[v].size(); i++) {
                edge e = G[v][i];
                if (d[e.to] > d[v] + e.cost && !(d[e.to] == INFl && d[v] == INFl)) {
                    d[e.to] = d[v] + e.cost;
                    que.push(P(d[e.to], e.to));
                }
            }
        }

    }

    /* 頂点fromに頂点toに達するコストcostの辺を貼る */
    void addEdge(int from, int to, T cost) {
        edge e;
        e.to = to;
        e.cost = cost;
        G[from].push_back(e);
    }
};

void solve(int n, int m) {
    int s, g;
    cin >> s >> g;
    s--;
    g--;

    auto conv = [&](int f, int t, int v) {
        //(頂点、速度)
        return v * n * n + f * n + t;
    };

    Dijkstra dij(200 * n * n + n * n + n);

    rep(i, 0, m) {
        int x, y, d, c;
        cin >> x >> y >> d >> c;
        x--;
        y--;
        auto check = [&](int v) {
            return v > 0 && v <= c;
        };
        rep(v, 0, 31) {
            for (int V = v - 1; V <= v + 1; V++) {
//                if(check(V)){
//                    double tmp = 1.0 * d / V;
//                    dij.addEdge(conv(x,v),conv(y,V),tmp);
//                    dij.addEdge(conv(y,v),conv(x,V),tmp);
//                }
                for (int f = 0; f < n; f++) {
                    if (check(V)) {
                        double tmp = 1.0 * d / V;
                        if (f != y) {
                            dij.addEdge(conv(f, x, v), conv(x, y, V), tmp);
                        }
                        if (f != x) {
                            dij.addEdge(conv(f, y, v), conv(y, x, V), tmp);
                        }
                    }
                }
            }
        }
    }

    dij.dijkstra(conv(s, s, 0));
//    cout << dij.d[conv(g,1)] << endl;
    double ans = INFl;
    rep(i, 0, n) {
        ans = min(ans, dij.d[conv(i, g, 1)]);
    }
    if (ans > 1e7) {
        cout << "unreachable" << endl;
    } else {
        cout << ans << endl;
//        printf("%.12lf", ans);
//        cout << endl;
    }

}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    while (true) {
        int n, m;
        cin >> n >> m;
        if (n == 0) break;
        solve(n, m);
    }

    return 0;
}



Measured memory_bytes: 65072